From 9b2ab3b7a29983beba6908644a69925fd7adf253 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Wed, 29 Apr 2020 14:42:03 -0700 Subject: add contact cmds, qol updates/ formatting, v9.1.0 --- src/bot.ts | 2 +- src/commands/bot/commandsamount.ts | 28 ++++++++++++++++ src/commands/bot/email.ts | 27 ++++++++++++++++ src/commands/bot/generatecommands.ts | 3 -- src/commands/bot/github.ts | 27 ++++++++++++++++ src/commands/bot/joinmessage.ts | 2 +- src/commands/bot/npm.ts | 26 +++++++++++++++ src/commands/bot/servercount.ts | 6 ++-- src/commands/bot/twitch.ts | 27 ++++++++++++++++ src/commands/bot/twitter.ts | 26 +++++++++++++++ src/commands/bot/website.ts | 27 ++++++++++++++++ src/commands/bot/youtube.ts | 27 ++++++++++++++++ src/commands/fun/offspring.ts | 3 +- src/commands/fun/opinion.ts | 2 +- src/commands/fun/quote.ts | 2 +- src/commands/fun/romannumeral.ts | 55 -------------------------------- src/commands/fun/showerthought.ts | 2 +- src/commands/fun/spoiler.ts | 2 +- src/commands/moderation/addrole.ts | 2 +- src/commands/moderation/clear.ts | 4 +-- src/commands/moderation/removerole.ts | 2 +- src/commands/server/oldestmember.ts | 2 +- src/commands/server/roleinfo.ts | 2 +- src/commands/server/roles.ts | 2 +- src/commands/user/age.ts | 4 +-- src/commands/user/pfp.ts | 4 +-- src/commands/utility/fortnitestats.ts | 2 +- src/commands/utility/gmodserverstatus.ts | 2 +- src/commands/utility/romannumeral.ts | 55 ++++++++++++++++++++++++++++++++ src/commands/voice/play.ts | 2 +- src/commands/voice/skip.ts | 2 +- src/commands/voice/volume.ts | 2 +- src/commands/zerotwo/darling.ts | 2 +- src/commands/zerotwo/douse.ts | 2 +- src/config.json | 2 +- 35 files changed, 300 insertions(+), 87 deletions(-) create mode 100644 src/commands/bot/commandsamount.ts create mode 100644 src/commands/bot/email.ts create mode 100644 src/commands/bot/github.ts create mode 100644 src/commands/bot/npm.ts create mode 100644 src/commands/bot/twitch.ts create mode 100644 src/commands/bot/twitter.ts create mode 100644 src/commands/bot/website.ts create mode 100644 src/commands/bot/youtube.ts delete mode 100644 src/commands/fun/romannumeral.ts create mode 100644 src/commands/utility/romannumeral.ts (limited to 'src') diff --git a/src/bot.ts b/src/bot.ts index fc4a6a5..f06742a 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -28,7 +28,7 @@ client.registry ['anime', 'Anime Command Group'], ['crypto', 'Crypto Command Group'], ['zerotwo', 'Zero Two Command Group'], - ['bot', 'Bot COmmand Group'], + ['bot', 'Bot Command Group'], ['user', 'User Command Group'], ['utility', 'Utility Command Group'], ['minecraft', 'Minecraft Command Group'], diff --git a/src/commands/bot/commandsamount.ts b/src/commands/bot/commandsamount.ts new file mode 100644 index 0000000..49b743e --- /dev/null +++ b/src/commands/bot/commandsamount.ts @@ -0,0 +1,28 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class CommandsAmountBot extends Command { + constructor(client) { + super(client, { + name: 'commandsamount', + aliases: [ + 'commands-amount', + 'cmdsamount', + 'cmds-amount' + ], + group: 'bot', + memberName: 'commandsamount', + description: 'Tells you the amount of available commands uwufier has.', + examples: ['uwu!cmdsamount'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + } + }); + } + async run(msg: CommandoMessage) { + msg.reply(`${this.client.user?.tag} has ${this.client.registry.commands.size} available commands! ${emoji.random()}`) + } +}; \ No newline at end of file diff --git a/src/commands/bot/email.ts b/src/commands/bot/email.ts new file mode 100644 index 0000000..d884b99 --- /dev/null +++ b/src/commands/bot/email.ts @@ -0,0 +1,27 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class TwitchBot extends Command { + constructor(client) { + super(client, { + name: 'email', + aliases: ['mail', 'contact', 'gmail'], + group: 'bot', + memberName: 'email', + description: 'Gives you a reference to the bot author\'s (Sin) best method of contact.', + examples: ['uwu!email'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription(`To contact <@217348698294714370>, please send a email to \`friskaofficial@gmail.com\`. Alternatively, you can either send a DM to <@217348698294714370> on Discord or on [Twitter](https://twitter.com/9inny). (All spam and unsolicited inquiries will be dealt with accordingly). ${emoji.random()}`) + msg.say(emb) + } +}; \ No newline at end of file diff --git a/src/commands/bot/generatecommands.ts b/src/commands/bot/generatecommands.ts index 11010c0..e1079f1 100644 --- a/src/commands/bot/generatecommands.ts +++ b/src/commands/bot/generatecommands.ts @@ -1,7 +1,4 @@ import { Command, CommandoMessage } from 'discord.js-commando'; -import emoji from 'emoji-random'; -import { MessageEmbed } from 'discord.js'; -import request from 'node-superfetch' module.exports = class GenerateCommandsBot extends Command { constructor(client) { diff --git a/src/commands/bot/github.ts b/src/commands/bot/github.ts new file mode 100644 index 0000000..426d7ec --- /dev/null +++ b/src/commands/bot/github.ts @@ -0,0 +1,27 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class GitHubBot extends Command { + constructor(client) { + super(client, { + name: 'github', + aliases: ['git', 'gitlab'], + group: 'bot', + memberName: 'github', + description: 'Gives you a link to the bot author\'s (Sin) GitHub profile.', + examples: ['uwu!github'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription(`Here is <@217348698294714370>'s [GitHub profile](https://github.com/8cy). ${emoji.random()}`) + msg.say(emb) + } +}; \ No newline at end of file diff --git a/src/commands/bot/joinmessage.ts b/src/commands/bot/joinmessage.ts index a98bee5..ed974fd 100644 --- a/src/commands/bot/joinmessage.ts +++ b/src/commands/bot/joinmessage.ts @@ -8,7 +8,7 @@ module.exports = class InviteBot extends Command { aliases: ['joinm', 'mjoin', 'joinmsg'], group: 'bot', memberName: 'joinmessage', - description: 'Resends the message which the bot sends when initially joining a server, however, this one doesn\'t go to the guild owner.', + description: 'Resends the message which the bot sent when initially joining a server, however, this one does NOT get sent to the guild owner.', examples: [ 'uwu!joinmessage', 'uwu!joinm', diff --git a/src/commands/bot/npm.ts b/src/commands/bot/npm.ts new file mode 100644 index 0000000..fcb84a5 --- /dev/null +++ b/src/commands/bot/npm.ts @@ -0,0 +1,26 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class NPMBot extends Command { + constructor(client) { + super(client, { + name: 'npm', + group: 'bot', + memberName: 'npm', + description: 'Gives you a link to the bot author\'s (Sin) NPM profile.', + examples: ['uwu!npm'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription(`Here is <@217348698294714370>'s [NPM profile](https://www.npmjs.com/~sinny). ${emoji.random()}`) + msg.say(emb) + } +}; \ No newline at end of file diff --git a/src/commands/bot/servercount.ts b/src/commands/bot/servercount.ts index 84fdaae..31f6482 100644 --- a/src/commands/bot/servercount.ts +++ b/src/commands/bot/servercount.ts @@ -2,14 +2,14 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import { MessageEmbed } from 'discord.js'; import emoji from 'emoji-random'; -module.exports = class ServerCountServer extends Command { +module.exports = class ServerCountBot extends Command { constructor(client) { super(client, { name: 'servercount', aliases: ['sc', 'scount', 'serverc'], - group: 'server', + group: 'bot', memberName: 'servercount', - description: 'Tells you the amount of servers uwufy is in.', + description: 'Tells you the amount of servers uwufier is in.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], ownerOnly: true diff --git a/src/commands/bot/twitch.ts b/src/commands/bot/twitch.ts new file mode 100644 index 0000000..e8f8c1e --- /dev/null +++ b/src/commands/bot/twitch.ts @@ -0,0 +1,27 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class TwitchBot extends Command { + constructor(client) { + super(client, { + name: 'twitch', + aliases: ['stream', 'streaming'], + group: 'bot', + memberName: 'twitch', + description: 'Gives you a link to the bot author\'s (Sin) Twitch profile.', + examples: ['uwu!twitch'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription(`Here is <@217348698294714370>'s [Twitch profile](https://www.twitch.tv/yosinny)! ${emoji.random()}`) + msg.say(emb) + } +}; \ No newline at end of file diff --git a/src/commands/bot/twitter.ts b/src/commands/bot/twitter.ts new file mode 100644 index 0000000..5817000 --- /dev/null +++ b/src/commands/bot/twitter.ts @@ -0,0 +1,26 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class TwitterBot extends Command { + constructor(client) { + super(client, { + name: 'twitter', + group: 'bot', + memberName: 'twitter', + description: 'Gives you a link to the bot author\'s (Sin) Twitter profile.', + examples: ['uwu!twitter'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription(`Here is <@217348698294714370>'s [Twitter profile](https://twitter.com/9inny). ${emoji.random()}`) + msg.say(emb) + } +}; \ No newline at end of file diff --git a/src/commands/bot/website.ts b/src/commands/bot/website.ts new file mode 100644 index 0000000..209af4d --- /dev/null +++ b/src/commands/bot/website.ts @@ -0,0 +1,27 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class WebsiteBot extends Command { + constructor(client) { + super(client, { + name: 'website', + aliases: ['site', 'cyne.cf', 'cyne'], + group: 'bot', + memberName: 'website', + description: 'Gives you a link to the bot author\'s (Sin) website.', + examples: ['uwu!website'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription(`Here is <@217348698294714370>'s [website](https://cyne.cf/)! ${emoji.random()}`) + msg.say(emb) + } +}; \ No newline at end of file diff --git a/src/commands/bot/youtube.ts b/src/commands/bot/youtube.ts new file mode 100644 index 0000000..901dd74 --- /dev/null +++ b/src/commands/bot/youtube.ts @@ -0,0 +1,27 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class YouTubeBot extends Command { + constructor(client) { + super(client, { + name: 'youtube', + aliases: ['yt'], + group: 'bot', + memberName: 'youtube', + description: 'Gives you a link to the bot author\'s (Sin) YouTube profile.', + examples: ['uwu!youtube'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription(`Here is <@217348698294714370>'s [Twitter profile](https://www.youtube.com/channel/UCJ-orR4HLwr2sJ1sRpFezSw?view_as=subscriber). Not the command you were looking for? If you were trying to play YouTube audio via the bot, please do \`uwu!play\` instead. ${emoji.random()}`) + msg.say(emb) + } +}; \ No newline at end of file diff --git a/src/commands/fun/offspring.ts b/src/commands/fun/offspring.ts index 7152a1c..e603f76 100644 --- a/src/commands/fun/offspring.ts +++ b/src/commands/fun/offspring.ts @@ -6,9 +6,10 @@ module.exports = class OffspringFun extends Command { constructor(client) { super(client, { name: 'offspring', + aliases: ['gender'], group: 'fun', memberName: 'offspring', - description: 'Determines your child\'s gender.', + description: 'Determines your future child\'s gender.', examples: ['uwu!offspring'], throttling: { usages: 5, diff --git a/src/commands/fun/opinion.ts b/src/commands/fun/opinion.ts index eada220..353846f 100644 --- a/src/commands/fun/opinion.ts +++ b/src/commands/fun/opinion.ts @@ -9,7 +9,7 @@ module.exports = class OpinionFun extends Command { name: 'opinion', group: 'fun', memberName: 'opinion', - description: 'Determines the bot\'s opinion of a specified thing.', + description: 'Determines uwufier\'s opinion of a specified thing.', examples: ['uwu!opinion'], throttling: { usages: 5, diff --git a/src/commands/fun/quote.ts b/src/commands/fun/quote.ts index 5149bbc..e090574 100644 --- a/src/commands/fun/quote.ts +++ b/src/commands/fun/quote.ts @@ -16,7 +16,7 @@ module.exports = class QuoteFun extends Command { aliases: ['quotes'], group: 'fun', memberName: 'quote', - description: 'Gives you a random quote from Adventure Time.', + description: 'Either gives you a random quote or a quote from a specified category.', throttling: { usages: 5, duration: 30 diff --git a/src/commands/fun/romannumeral.ts b/src/commands/fun/romannumeral.ts deleted file mode 100644 index f7a805f..0000000 --- a/src/commands/fun/romannumeral.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Command, CommandoMessage } from 'discord.js-commando'; -import emoji from 'emoji-random' -import romanize from 'romanize' - -module.exports = class RomanNumeralFun extends Command { - constructor(client) { - super(client, { - name: 'romannumeral', - aliases: [ - 'roman-numeral', - 'romannumerals', - 'roman-numerals' - ], - group: 'fun', - memberName: 'romannumeral', - description: 'Converts a number to a roman numeral.', - examples: ['uwu!romannumeral 12'], - throttling: { - usages: 5, - duration: 30 - }, - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - args: [ - { - key: 'nNum', - prompt: 'What number would you like to translate', - type: 'integer', - min: 1 - } - ] - }); - } - run(msg: CommandoMessage, { nNum }) { - if (nNum === parseInt(nNum, 10)) { - msg.reply(romanize(nNum)) - } - - const back = value => { - let res = 0 - - const decimal = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] - const roman = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"] - for (let i = 0; i <= decimal.length; i++) { - while (value.indexOf(roman[i]) === 0) { - res += decimal[i] - value = value.replace(roman[i], '') - } - } - return res - } - - msg.reply(back(nNum)) - } -}; \ No newline at end of file diff --git a/src/commands/fun/showerthought.ts b/src/commands/fun/showerthought.ts index 5ee7cb4..ba7e86a 100644 --- a/src/commands/fun/showerthought.ts +++ b/src/commands/fun/showerthought.ts @@ -12,7 +12,7 @@ module.exports = class ShowerThoughtFun extends SubredditCommand { ], group: 'fun', memberName: 'showerthought', - description: 'Shower thoughts.', + description: 'Gives you a shower thought from **r/Showerthought**.', examples: ['uwu!showerthought'], throttling: { usages: 5, diff --git a/src/commands/fun/spoiler.ts b/src/commands/fun/spoiler.ts index 4144f48..a2517cb 100644 --- a/src/commands/fun/spoiler.ts +++ b/src/commands/fun/spoiler.ts @@ -7,7 +7,7 @@ module.exports = class SpoilerFun extends Command { aliases: ['spoil', 'spoilertext', 'spoiler-text', 'spoiltext', 'spoil-text'], group: 'fun', memberName: 'spoiler', - description: 'Turn every character in a specified phrase as a ||spoiler||.', + description: 'Turn every character in a specified phrase as a ||s||||p||||o||||i||||l||||e||||r||.', args: [ { key: 'say', diff --git a/src/commands/moderation/addrole.ts b/src/commands/moderation/addrole.ts index 65b8f8b..63f2f14 100644 --- a/src/commands/moderation/addrole.ts +++ b/src/commands/moderation/addrole.ts @@ -8,7 +8,7 @@ module.exports = class AddRoleModeration extends Command { aliases: ['roleadd'], group: 'moderation', memberName: 'addrole', - description: '[Disabled] Adds a role to a specific user.', + description: '**[Disabled]** Adds a role to a specific user.', // args: [ // { // key: 'userID', diff --git a/src/commands/moderation/clear.ts b/src/commands/moderation/clear.ts index c2f44ab..5175556 100644 --- a/src/commands/moderation/clear.ts +++ b/src/commands/moderation/clear.ts @@ -1,12 +1,12 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import emoji from 'emoji-random'; -module.exports = class ClearBot extends Command { +module.exports = class ClearModeration extends Command { constructor(client) { super(client, { name: 'clear', aliases: ['delete', 'del', 'c'], - group: 'bot', + group: 'moderation', memberName: 'clear', description: 'Clears a specified amount of messages.', guildOnly: true, diff --git a/src/commands/moderation/removerole.ts b/src/commands/moderation/removerole.ts index 104606d..d86dbf2 100644 --- a/src/commands/moderation/removerole.ts +++ b/src/commands/moderation/removerole.ts @@ -7,7 +7,7 @@ module.exports = class RemoveRoleModeration extends Command { aliases: ['roleremove'], group: 'moderation', memberName: 'removerole', - description: '[Disabled] Removes a role to a specific user.', + description: '**[Disabled]** Removes a role from a specific user.', // args: [ // { // key: 'userID', diff --git a/src/commands/server/oldestmember.ts b/src/commands/server/oldestmember.ts index c14e694..4d5cd17 100644 --- a/src/commands/server/oldestmember.ts +++ b/src/commands/server/oldestmember.ts @@ -13,7 +13,7 @@ module.exports = class OldestMemberServer extends Command { 'oldest-user', 'oldest' ], - group: 'fun', + group: 'server', memberName: 'oldestmember', description: 'Checks who the oldest member on the server is.', examples: ['uwu!oldestmember'], diff --git a/src/commands/server/roleinfo.ts b/src/commands/server/roleinfo.ts index 3fc3814..9493734 100644 --- a/src/commands/server/roleinfo.ts +++ b/src/commands/server/roleinfo.ts @@ -9,7 +9,7 @@ module.exports = class RoleInfoServer extends Command { aliases: [ 'role-info' ], - group: 'fun', + group: 'server', memberName: 'roleinfo', description: 'Gets information on a specified role.', examples: ['uwu!roleinfo @Role'], diff --git a/src/commands/server/roles.ts b/src/commands/server/roles.ts index e55f3a8..8ec4a01 100644 --- a/src/commands/server/roles.ts +++ b/src/commands/server/roles.ts @@ -13,7 +13,7 @@ module.exports = class RolesServer extends Command { 'roles-list', 'roleslist' ], - group: 'fun', + group: 'server', memberName: 'roles', description: 'Lists all the roles on the current server.', examples: ['uwu!roles'], diff --git a/src/commands/user/age.ts b/src/commands/user/age.ts index 0ba4515..f541d67 100644 --- a/src/commands/user/age.ts +++ b/src/commands/user/age.ts @@ -3,7 +3,7 @@ import emoji from 'emoji-random' import { formatDistance, formatRelative } from 'date-fns' import { stripIndents } from 'common-tags' -module.exports = class AgeFun extends Command { +module.exports = class AgeUser extends Command { constructor(client) { super(client, { name: 'age', @@ -11,7 +11,7 @@ module.exports = class AgeFun extends Command { 'account-age', 'accountage' ], - group: 'fun', + group: 'user', memberName: 'age', description: 'Checks when a specified Discord account was created.', examples: ['uwu!age', 'uwu!age @sin#1337'], diff --git a/src/commands/user/pfp.ts b/src/commands/user/pfp.ts index f4fdee5..ac26a26 100644 --- a/src/commands/user/pfp.ts +++ b/src/commands/user/pfp.ts @@ -14,9 +14,9 @@ module.exports = class PFPServer extends Command { 'avatar', 'avi' ], - group: 'server', + group: 'user', memberName: 'pfp', - description: 'Grabs the profile picture of a given user.', + description: 'Grabs the profile picture of a specified user.', args: [ { key: 'userID', diff --git a/src/commands/utility/fortnitestats.ts b/src/commands/utility/fortnitestats.ts index 88a50a0..84e0115 100644 --- a/src/commands/utility/fortnitestats.ts +++ b/src/commands/utility/fortnitestats.ts @@ -22,7 +22,7 @@ module.exports = class FortniteStatsUtility extends Command { ], group: 'utility', memberName: 'fortnitestats', - description: 'Grabs a specified player\' Fortnite statistics.', + description: 'Grabs a specified player\'s Fortnite statistics.', details: 'Available platforms are `pc` (PC), `xbp` (Xbox Live) and `psn` (Playstation Network).', examples: [ 'uwu!fortnitestats Frozen', diff --git a/src/commands/utility/gmodserverstatus.ts b/src/commands/utility/gmodserverstatus.ts index a92b5cf..f7d3b35 100644 --- a/src/commands/utility/gmodserverstatus.ts +++ b/src/commands/utility/gmodserverstatus.ts @@ -16,7 +16,7 @@ module.exports = class GModServerStatusUtility extends Command { ], group: 'utility', memberName: 'gmodserverstatus', - description: 'Grabs you the server status of a GMod server.', + description: 'Grabs you the server status of a Garry\'s Mod server.', examples: [ 'uwu!gmodserverstatus', 'uwu!gmodss' diff --git a/src/commands/utility/romannumeral.ts b/src/commands/utility/romannumeral.ts new file mode 100644 index 0000000..8dcc331 --- /dev/null +++ b/src/commands/utility/romannumeral.ts @@ -0,0 +1,55 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random' +import romanize from 'romanize' + +module.exports = class RomanNumeralUtility extends Command { + constructor(client) { + super(client, { + name: 'romannumeral', + aliases: [ + 'roman-numeral', + 'romannumerals', + 'roman-numerals' + ], + group: 'utility', + memberName: 'romannumeral', + description: 'Converts a number to a roman numeral.', + examples: ['uwu!romannumeral 12'], + throttling: { + usages: 5, + duration: 30 + }, + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + args: [ + { + key: 'nNum', + prompt: 'What number would you like to translate', + type: 'integer', + min: 1 + } + ] + }); + } + run(msg: CommandoMessage, { nNum }) { + if (nNum === parseInt(nNum, 10)) { + msg.reply(romanize(nNum)) + } + + const back = value => { + let res = 0 + + const decimal = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] + const roman = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"] + for (let i = 0; i <= decimal.length; i++) { + while (value.indexOf(roman[i]) === 0) { + res += decimal[i] + value = value.replace(roman[i], '') + } + } + return res + } + + msg.reply(back(nNum) + ' ' + emoji.random()) + } +}; \ No newline at end of file diff --git a/src/commands/voice/play.ts b/src/commands/voice/play.ts index c6d37a9..6041843 100644 --- a/src/commands/voice/play.ts +++ b/src/commands/voice/play.ts @@ -13,7 +13,7 @@ module.exports = class PlayVoice extends Command { name: 'play', group: 'voice', memberName: 'play', - description: 'Play the audio of a YouTube video in a voice channel.', + description: 'Play the audio of a YouTube video in a voice channel. (Other audio providers coming soon!)', guildOnly: true, clientPermissions: ['SPEAK', 'CONNECT', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], diff --git a/src/commands/voice/skip.ts b/src/commands/voice/skip.ts index 8c8740b..1cbe630 100644 --- a/src/commands/voice/skip.ts +++ b/src/commands/voice/skip.ts @@ -7,7 +7,7 @@ module.exports = class SkipVoice extends Command { name: 'skip', group: 'voice', memberName: 'skip', - description: 'Skips one song ahead in the current queue.', + description: 'Skip one song ahead in the current queue.', guildOnly: true, examples: ['uwu!skip'], clientPermissions: ['SPEAK', 'CONNECT', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], diff --git a/src/commands/voice/volume.ts b/src/commands/voice/volume.ts index 483653e..4851ee7 100644 --- a/src/commands/voice/volume.ts +++ b/src/commands/voice/volume.ts @@ -8,7 +8,7 @@ module.exports = class VolumeVoice extends Command { aliases: ['vol'], group: 'voice', memberName: 'volume', - description: 'Changes volume of any currentaly playing audio.', + description: 'Changes volume of any currently playing audio.', guildOnly: true, args: [ { diff --git a/src/commands/zerotwo/darling.ts b/src/commands/zerotwo/darling.ts index 173407b..bc0dc25 100644 --- a/src/commands/zerotwo/darling.ts +++ b/src/commands/zerotwo/darling.ts @@ -10,7 +10,7 @@ module.exports = class DarlingZeroTwo extends Command { name: 'darling', group: 'zerotwo', memberName: 'darling', - description: 'Get\'s or sets uwufier\'s current darling.', + description: 'Allows you to set, change or delete uwufier\'s darling.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], examples: [ diff --git a/src/commands/zerotwo/douse.ts b/src/commands/zerotwo/douse.ts index cced22d..5fc21af 100644 --- a/src/commands/zerotwo/douse.ts +++ b/src/commands/zerotwo/douse.ts @@ -5,7 +5,7 @@ module.exports = class DouseZeroTwo extends Command { constructor(client) { super(client, { name: 'douse', - group: 'fun', + group: 'zerotwo', memberName: 'douse', description: 'Douses Zero Two.', examples: [ diff --git a/src/config.json b/src/config.json index 72067c6..1f9cba8 100644 --- a/src/config.json +++ b/src/config.json @@ -1,7 +1,7 @@ { "secret":"Njk5NDczMjYzOTk4MjcxNDg5.XpU5oQ.btZuxVudhNllSQY6CxrXXtMJm9A", "yt-api-key":"AIzaSyCeG1lQAeInv4vjFv_eTL9IFAFNdQC9Nk8", - "version":"9.0.1", + "version":"9.1.0", "fortniteTrackerNetworkToken": "4cf21f95-5f1a-412a-b4a7-e5424adc314a", "maxMultipler": 100, "minMultipler": 1.01 -- cgit v1.2.3