diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index 62b5587d..ab39bc79 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -11,11 +11,13 @@ module.exports = class YearsCommand extends Command { group: 'avataredit', memberName: '3000years', description: 'It\'s been 3000 years...', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/beautiful.js b/commands/avataredit/beautiful.js index bdf9335f..07700e70 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avataredit/beautiful.js @@ -11,11 +11,13 @@ module.exports = class BeautifulCommand extends Command { group: 'avataredit', memberName: 'beautiful', description: 'Oh, this? This is beautiful.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/bobross.js b/commands/avataredit/bobross.js index 50ba666e..1eba330e 100644 --- a/commands/avataredit/bobross.js +++ b/commands/avataredit/bobross.js @@ -11,11 +11,13 @@ module.exports = class BobRossCommand extends Command { group: 'avataredit', memberName: 'bobross', description: 'Make Bob Ross draw an avatar.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/greyscale.js b/commands/avataredit/greyscale.js index e9853fcd..88948750 100644 --- a/commands/avataredit/greyscale.js +++ b/commands/avataredit/greyscale.js @@ -7,12 +7,14 @@ module.exports = class GreyscaleCommand extends Command { name: 'greyscale', group: 'avataredit', memberName: 'greyscale', - description: 'Greyscale your avatar colors.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + description: 'Greyscale a user\'s avatar colors.', + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/invert.js b/commands/avataredit/invert.js index 05fbc12a..90282a29 100644 --- a/commands/avataredit/invert.js +++ b/commands/avataredit/invert.js @@ -7,12 +7,14 @@ module.exports = class InvertCommand extends Command { name: 'invert', group: 'avataredit', memberName: 'invert', - description: 'Invert your avatar colors.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + description: 'Invert a user\'s avatar colors.', + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/rip.js b/commands/avataredit/rip.js index 104c7a7e..6611b7ce 100644 --- a/commands/avataredit/rip.js +++ b/commands/avataredit/rip.js @@ -12,11 +12,13 @@ module.exports = class RIPCommand extends Command { group: 'avataredit', memberName: 'rip', description: 'Puts a user\'s avatar over a gravestone.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/steamcard.js b/commands/avataredit/steamcard.js index 27c2e911..7053a656 100644 --- a/commands/avataredit/steamcard.js +++ b/commands/avataredit/steamcard.js @@ -11,11 +11,13 @@ module.exports = class SteamCardCommand extends Command { group: 'avataredit', memberName: 'steamcard', description: 'Put an avatar on a Steam Card.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/triggered.js b/commands/avataredit/triggered.js index 17a4e9d2..8900d226 100644 --- a/commands/avataredit/triggered.js +++ b/commands/avataredit/triggered.js @@ -8,11 +8,13 @@ module.exports = class TriggeredCommand extends Command { group: 'avataredit', memberName: 'triggered', description: 'Put an avatar on a "Triggered" sign.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/avataredit/wanted.js b/commands/avataredit/wanted.js index 4a91eb13..a7914807 100644 --- a/commands/avataredit/wanted.js +++ b/commands/avataredit/wanted.js @@ -8,11 +8,13 @@ module.exports = class WantedCommand extends Command { group: 'avataredit', memberName: 'wanted', description: 'Puts an avatar on a wanted poster.', - args: [{ - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/games/mathgame.js b/commands/games/mathgame.js index 5b0ed761..8ebb0ab5 100644 --- a/commands/games/mathgame.js +++ b/commands/games/mathgame.js @@ -10,17 +10,19 @@ module.exports = class MathGameCommand extends Command { group: 'games', memberName: 'mathgame', description: 'See how fast you can answer a math problem in a given time limit.', - args: [{ - key: 'difficulty', - prompt: 'What should the difficulty of the math game be? `Easy`, `Medium`, `Hard`, `Extreme`, or `Impossible`?', - type: 'string', - validate: difficulty => { - if (['easy', 'medium', 'hard', 'extreme', 'impossible'].includes(difficulty.toLowerCase())) - return true; - return 'Please set the difficulty to either `easy`, `medium`, `hard`, `extreme`, or `impossible`.'; - }, - parse: difficulty => difficulty.toLowerCase() - }] + args: [ + { + key: 'difficulty', + prompt: 'What should the difficulty of the math game be? `Easy`, `Medium`, `Hard`, `Extreme`, or `Impossible`?', + type: 'string', + validate: difficulty => { + if (['easy', 'medium', 'hard', 'extreme', 'impossible'].includes(difficulty.toLowerCase())) + return true; + return 'Please set the difficulty to either `easy`, `medium`, `hard`, `extreme`, or `impossible`.'; + }, + parse: difficulty => difficulty.toLowerCase() + } + ] }); } @@ -48,9 +50,7 @@ module.exports = class MathGameCommand extends Command { value = 10000; break; } - const value1 = Math.floor(Math.random() * value) + 1; - const value2 = Math.floor(Math.random() * value) + 1; - const expression = `${value1} ${operation} ${value2}`; + const expression = `${Math.floor(Math.random() * value) + 1} ${operation} ${Math.floor(Math.random() * value) + 1}`; const solved = math.eval(expression).toString(); const embed = new RichEmbed() .setTitle('You have **10** seconds to answer:') diff --git a/commands/games/rockpaperscissors.js b/commands/games/rockpaperscissors.js index eb8a8bf1..98cdf3dd 100644 --- a/commands/games/rockpaperscissors.js +++ b/commands/games/rockpaperscissors.js @@ -11,17 +11,19 @@ module.exports = class RockPaperScissorsCommand extends Command { group: 'games', memberName: 'rps', description: 'Play Rock-Paper-Scissors.', - args: [{ - key: 'choice', - prompt: '`Rock`, `Paper`, or `Scissors`?', - type: 'string', - validate: choice => { - if (['rock', 'paper', 'scissors'].includes(choice.toLowerCase())) - return true; - return 'Please enter either `rock`, `paper`, or `scissors`.'; - }, - parse: choice => choice.toLowerCase() - }] + args: [ + { + key: 'choice', + prompt: '`Rock`, `Paper`, or `Scissors`?', + type: 'string', + validate: choice => { + if (['rock', 'paper', 'scissors'].includes(choice.toLowerCase())) + return true; + return 'Please enter either `rock`, `paper`, or `scissors`.'; + }, + parse: choice => choice.toLowerCase() + } + ] }); } diff --git a/commands/games/typinggame.js b/commands/games/typinggame.js index 1b31aa69..2b266c9e 100644 --- a/commands/games/typinggame.js +++ b/commands/games/typinggame.js @@ -9,17 +9,19 @@ module.exports = class TypingGameCommand extends Command { group: 'games', memberName: 'typinggame', description: 'See how fast you can type a sentence in a given time limit.', - args: [{ - key: 'difficulty', - prompt: 'What should the difficulty of the typing game be? `Easy`, `Medium`, `Hard`, `Extreme`, or `Impossible`?', - type: 'string', - validate: difficulty => { - if (['easy', 'medium', 'hard', 'extreme', 'impossible'].includes(difficulty.toLowerCase())) - return true; - return 'Please set the difficulty to either `easy`, `medium`, `hard`, `extreme`, or `impossible`.'; - }, - parse: difficulty => difficulty.toLowerCase() - }] + args: [ + { + key: 'difficulty', + prompt: 'What should the difficulty of the typing game be? `Easy`, `Medium`, `Hard`, `Extreme`, or `Impossible`?', + type: 'string', + validate: difficulty => { + if (['easy', 'medium', 'hard', 'extreme', 'impossible'].includes(difficulty.toLowerCase())) + return true; + return 'Please set the difficulty to either `easy`, `medium`, `hard`, `extreme`, or `impossible`.'; + }, + parse: difficulty => difficulty.toLowerCase() + } + ] }); } diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index 1fefbeb9..64c91d5f 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -9,37 +9,41 @@ module.exports = class MemeCommand extends Command { memberName: 'meme', description: 'Sends a Meme with text of your choice, and a background of your choice.', details: `**Codes:** ${codes.join(', ')}`, - args: [{ - key: 'type', - prompt: 'What meme type do you want to use?', - type: 'string', - validate: type => { - if (codes.includes(type.toLowerCase())) - return true; - return `${type.toLowerCase()} is not a valid meme type. Use \`x;help meme\` to view a list of types.`; + args: [ + { + key: 'type', + prompt: 'What meme type do you want to use?', + type: 'string', + validate: type => { + if (codes.includes(type.toLowerCase())) + return true; + return `${type.toLowerCase()} is not a valid meme type. Use \`help meme\` to view a list of types.`; + }, + parse: type => type.toLowerCase() }, - parse: type => type.toLowerCase() - }, { - key: 'top', - prompt: 'What should the top row of the meme to be?', - type: 'string', - validate: top => { - if (/[a-zA-Z0-9.,!?'\s]+$/g.test(top) && top.length < 100) - return true; - return `Please do not use special characters and keep the rows under 100 characters each, top row has ${top.length}.`; + { + key: 'top', + prompt: 'What should the top row of the meme to be?', + type: 'string', + validate: top => { + if (/[a-zA-Z0-9.,!?'\s]+$/g.test(top) && top.length < 100) + return true; + return `Please do not use special characters and keep the rows under 100 characters each, top row has ${top.length}.`; + }, + parse: top => top.replace(/[ ]/g, '-').replace(/[?]/g, '~q') }, - parse: top => top.replace(/[ ]/g, '-').replace(/[?]/g, '~q') - }, { - key: 'bottom', - prompt: 'What should the bottom row of the meme to be?', - type: 'string', - validate: bottom => { - if (/[a-zA-Z0-9.,!?'\s]+$/g.test(bottom) && bottom.length < 100) - return true; - return `Please do not use special characters and keep the rows under 100 characters each, bottom row has ${bottom.length}.`; - }, - parse: bottom => bottom.replace(/[ ]/g, '-').replace(/[?]/g, '~q') - }] + { + key: 'bottom', + prompt: 'What should the bottom row of the meme to be?', + type: 'string', + validate: bottom => { + if (/[a-zA-Z0-9.,!?'\s]+$/g.test(bottom) && bottom.length < 100) + return true; + return `Please do not use special characters and keep the rows under 100 characters each, bottom row has ${bottom.length}.`; + }, + parse: bottom => bottom.replace(/[ ]/g, '-').replace(/[?]/g, '~q') + } + ] }); } diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 29703564..046c7590 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -12,21 +12,24 @@ module.exports = class BanCommand extends Command { memberName: 'ban', description: 'Bans a user and logs the ban to the mod_logs.', guildOnly: true, - args: [{ - key: 'member', - prompt: 'What member do you want to ban?', - type: 'member' - }, { - key: 'reason', - prompt: 'What do you want to set the reason as?', - type: 'string', - validate: reason => { - if (reason.length < 140) { - return true; + args: [ + { + key: 'member', + prompt: 'What member do you want to ban?', + type: 'member' + }, + { + key: 'reason', + prompt: 'What do you want to set the reason as?', + type: 'string', + validate: reason => { + if (reason.length < 140) { + return true; + } + return `Please keep your reason under 140 characters, you have ${reason.length}.`; } - return `Please keep your reason under 140 characters, you have ${reason.length}.`; } - }] + ] }); } diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index dd7619ee..d133fa31 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -9,21 +9,24 @@ module.exports = class KickCommand extends Command { memberName: 'kick', description: 'Kicks a user and logs the kick to the mod_logs.', guildOnly: true, - args: [{ - key: 'member', - prompt: 'What member do you want to kick?', - type: 'member' - }, { - key: 'reason', - prompt: 'What do you want to set the reason as?', - type: 'string', - validate: reason => { - if (reason.length < 140) { - return true; + args: [ + { + key: 'member', + prompt: 'What member do you want to kick?', + type: 'member' + }, + { + key: 'reason', + prompt: 'What do you want to set the reason as?', + type: 'string', + validate: reason => { + if (reason.length < 140) { + return true; + } + return `Please keep your reason under 140 characters, you have ${reason.length}.`; } - return `Please keep your reason under 140 characters, you have ${reason.length}.`; } - }] + ] }); } diff --git a/commands/moderation/lockdown.js b/commands/moderation/lockdown.js index 1c5e2a16..d3396380 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -8,17 +8,19 @@ module.exports = class LockdownCommand extends Command { memberName: 'lockdown', description: 'Locks down the current channel or removes a lockdown, which prevents non-administrator members from speaking.', guildOnly: true, - args: [{ - key: 'type', - prompt: 'Please enter either `start` or `stop`.', - type: 'string', - validate: type => { - if (['start', 'stop'].includes(type.toLowerCase())) - return true; - return 'Please enter either `start` or `stop`.'; - }, - parse: type => type.toLowerCase() - }] + args: [ + { + key: 'type', + prompt: 'Please enter either `start` or `stop`.', + type: 'string', + validate: type => { + if (['start', 'stop'].includes(type.toLowerCase())) + return true; + return 'Please enter either `start` or `stop`.'; + }, + parse: type => type.toLowerCase() + } + ] }); } diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index e1e6a98f..b577296c 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -12,16 +12,19 @@ module.exports = class PruneCommand extends Command { usages: 1, duration: 60 }, - args: [{ - key: 'count', - prompt: 'How many messages do you want to delete? Limit of up to 99.', - type: 'integer', - validate: count => { - if (count < 100 && count > 0) - return true; - return `${count} is not a valid amount of messages. Limit 1-99.`; + args: [ + { + key: 'count', + label: 'amount of messages', + prompt: 'How many messages do you want to delete? Limit of up to 99.', + type: 'integer', + validate: count => { + if (count < 100 && count > 0) + return true; + return `${count} is not a valid amount of messages. Limit 1-99.`; + } } - }] + ] }); } diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index e0dec964..5480f33b 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -9,21 +9,24 @@ module.exports = class SoftbanCommand extends Command { memberName: 'softban', description: 'Kicks a user and deletes their messages, and logs the softban to the mod_logs.', guildOnly: true, - args: [{ - key: 'member', - prompt: 'What member do you want to softban?', - type: 'member' - }, { - key: 'reason', - prompt: 'What do you want to set the reason as?', - type: 'string', - validate: reason => { - if (reason.length < 140) { - return true; + args: [ + { + key: 'member', + prompt: 'What member do you want to softban?', + type: 'member' + }, + { + key: 'reason', + prompt: 'What do you want to set the reason as?', + type: 'string', + validate: reason => { + if (reason.length < 140) { + return true; + } + return `Please keep your reason under 140 characters, you have ${reason.length}.`; } - return `Please keep your reason under 140 characters, you have ${reason.length}.`; } - }] + ] }); } diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 65722639..80c0a3ef 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -12,25 +12,28 @@ module.exports = class UnbanCommand extends Command { memberName: 'unban', description: 'Unbans a user and logs the unban to the mod_logs.', guildOnly: true, - args: [{ - key: 'id', - prompt: 'What member do you want to unban? Please enter the ID of the user.', - type: 'string', - validate: id => { - if (id.length === 18) - return true; - return `${id} is not a valid ID. Please enter the user you wish to unban's ID.`; + args: [ + { + key: 'id', + prompt: 'What member do you want to unban? Please enter the ID of the user.', + type: 'string', + validate: id => { + if (id.length === 18) + return true; + return `${id} is not a valid ID. Please enter the user you wish to unban's ID.`; + } + }, + { + key: 'reason', + prompt: 'What do you want to set the reason as?', + type: 'string', + validate: reason => { + if (reason.length < 140) + return true; + return `Please keep your reason under 140 characters, you have ${reason.length}.`; + } } - }, { - key: 'reason', - prompt: 'What do you want to set the reason as?', - type: 'string', - validate: reason => { - if (reason.length < 140) - return true; - return `Please keep your reason under 140 characters, you have ${reason.length}.`; - } - }] + ] }); } diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index 934863dc..927dc032 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -9,20 +9,23 @@ module.exports = class WarnCommand extends Command { memberName: 'warn', description: 'Warns a user and logs the warn to the mod_logs.', guildOnly: true, - args: [{ - key: 'member', - prompt: 'What member do you want to warn?', - type: 'member' - }, { - key: 'reason', - prompt: 'What do you want to set the reason as?', - type: 'string', - validate: reason => { - if (reason.length < 140) - return true; - return `Please keep your reason under 140 characters, you have ${reason.length}.`; + args: [ + { + key: 'member', + prompt: 'What member do you want to warn?', + type: 'member' + }, + { + key: 'reason', + prompt: 'What do you want to set the reason as?', + type: 'string', + validate: reason => { + if (reason.length < 140) + return true; + return `Please keep your reason under 140 characters, you have ${reason.length}.`; + } } - }] + ] }); } diff --git a/commands/random/easteregg.js b/commands/random/easteregg.js index c1fe8d33..61cb95f0 100644 --- a/commands/random/easteregg.js +++ b/commands/random/easteregg.js @@ -11,17 +11,19 @@ module.exports = class EasterEggCommand extends Command { group: 'random', memberName: 'easteregg', description: 'Can you discover all the easter eggs?', - args: [{ - key: 'tag', - prompt: 'What easter egg do you want to view?', - type: 'string', - validate: tag => { - if (eastereggs[tag.toLowerCase()]) - return true; - return 'Nope, that\'s not a valid easter egg. Try again!'; - }, - parse: tag => tag.toLowerCase() - }] + args: [ + { + key: 'tag', + prompt: 'What easter egg do you want to view?', + type: 'string', + validate: tag => { + if (eastereggs[tag.toLowerCase()]) + return true; + return 'Nope, that\'s not a valid easter egg. Try again!'; + }, + parse: tag => tag.toLowerCase() + } + ] }); } diff --git a/commands/random/math.js b/commands/random/math.js index c86599a8..8927e1f1 100644 --- a/commands/random/math.js +++ b/commands/random/math.js @@ -8,11 +8,13 @@ module.exports = class MathCommand extends Command { group: 'random', memberName: 'math', description: 'Does math.', - args: [{ - key: 'expression', - prompt: 'What do you want to answer?', - type: 'string' - }] + args: [ + { + key: 'expression', + prompt: 'What do you want to answer?', + type: 'string' + } + ] }); } diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index bf1aa535..7cde6446 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -8,41 +8,44 @@ module.exports = class StrawpollCommand extends Command { group: 'random', memberName: 'strawpoll', description: 'Creates a Strawpoll with your options.', - args: [{ - key: 'title', - prompt: 'What would you like the title of the Strawpoll to be?', - type: 'string', - validate: title => { - if (title.length < 200) - return true; - return `Please keep your title under 200 characters, you have ${title.length}.`; + args: [ + { + key: 'title', + prompt: 'What would you like the title of the Strawpoll to be?', + type: 'string', + validate: title => { + if (title.length < 200) + return true; + return `Please keep your title under 200 characters, you have ${title.length}.`; + } + }, + { + key: 'options', + prompt: 'What options do you want me pick from? Maximum of 31.', + type: 'string', + infinite: true, + validate: choice => { + if (choice.length < 160) + return true; + return `Please keep your options under 160 characters each, you have ${choice.length}.`; + } } - }, { - key: 'choices', - prompt: 'What choices do you want me pick from? Maximum of 31.', - type: 'string', - infinite: true, - validate: choice => { - if (choice.length < 160) - return true; - return `Please keep your choices under 160 characters each, you have ${choice.length}.`; - } - }] + ] }); } async run(msg, args) { - const { title, choices } = args; - if (choices.length < 2) + const { title, options } = args; + if (options.length < 2) return msg.say('You provided less than two choices.'); - if (choices.length > 31) + if (options.length > 31) return msg.say('You provided more than thirty choices.'); try { const { body } = await request .post('https://strawpoll.me/api/v2/polls') .send({ - title: title, - options: choices + title, + options }); return msg.say(`${body.title}\nhttp://strawpoll.me/${body.id}`); } catch (err) { diff --git a/commands/response/8ball.js b/commands/response/8ball.js index 01277a20..e9fcf398 100644 --- a/commands/response/8ball.js +++ b/commands/response/8ball.js @@ -8,11 +8,13 @@ module.exports = class MagicBallCommand extends Command { group: 'response', memberName: '8ball', description: 'Predicts your future.', - args: [{ - key: 'question', - prompt: 'What do you want to ask the 8 ball?', - type: 'string' - }] + args: [ + { + key: 'question', + prompt: 'What do you want to ask the 8 ball?', + type: 'string' + } + ] }); } diff --git a/commands/response/choose.js b/commands/response/choose.js index fa510b78..8ae97184 100644 --- a/commands/response/choose.js +++ b/commands/response/choose.js @@ -7,12 +7,14 @@ module.exports = class ChooseCommand extends Command { group: 'response', memberName: 'choose', description: 'Chooses between things.', - args: [{ - key: 'choices', - prompt: 'What choices do you want me pick from?', - type: 'string', - infinite: true - }] + args: [ + { + key: 'choices', + prompt: 'What choices do you want me pick from?', + type: 'string', + infinite: true + } + ] }); } diff --git a/commands/response/compliment.js b/commands/response/compliment.js index 557919bc..392a509e 100644 --- a/commands/response/compliment.js +++ b/commands/response/compliment.js @@ -8,11 +8,13 @@ module.exports = class ComplimentCommand extends Command { group: 'response', memberName: 'compliment', description: 'Compliments something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to compliment?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to compliment?', + type: 'string' + } + ] }); } diff --git a/commands/response/name.js b/commands/response/name.js index 23197eb1..4be82c4f 100644 --- a/commands/response/name.js +++ b/commands/response/name.js @@ -8,17 +8,19 @@ module.exports = class RandomNameCommand extends Command { group: 'response', memberName: 'name', description: 'Generates a random name.', - args: [{ - key: 'gender', - prompt: 'Which gender do you want to generate a name for?', - type: 'string', - validate: gender => { - if (['male', 'female'].includes(gender.toLowerCase())) - return true; - return 'Please enter either `male` or `female`.'; - }, - parse: gender => gender.toLowerCase() - }] + args: [ + { + key: 'gender', + prompt: 'Which gender do you want to generate a name for?', + type: 'string', + validate: gender => { + if (['male', 'female'].includes(gender.toLowerCase())) + return true; + return 'Please enter either `male` or `female`.'; + }, + parse: gender => gender.toLowerCase() + } + ] }); } diff --git a/commands/response/ratewaifu.js b/commands/response/ratewaifu.js index b92af5c4..a13f2c98 100644 --- a/commands/response/ratewaifu.js +++ b/commands/response/ratewaifu.js @@ -10,11 +10,13 @@ module.exports = class RateWaifuCommand extends Command { group: 'response', memberName: 'ratewaifu', description: 'Rates your Waifu.', - args: [{ - key: 'waifu', - prompt: 'Who do you want to rate?', - type: 'string' - }] + args: [ + { + key: 'waifu', + prompt: 'Who do you want to rate?', + type: 'string' + } + ] }); } diff --git a/commands/response/roast.js b/commands/response/roast.js index 3fdfacdc..c3e9cc5f 100644 --- a/commands/response/roast.js +++ b/commands/response/roast.js @@ -8,11 +8,13 @@ module.exports = class RoastCommand extends Command { group: 'response', memberName: 'roast', description: 'Roasts something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roast?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roast?', + type: 'string' + } + ] }); } diff --git a/commands/response/roll.js b/commands/response/roll.js index 7cc4fdf6..25870bfa 100644 --- a/commands/response/roll.js +++ b/commands/response/roll.js @@ -10,11 +10,14 @@ module.exports = class RollCommand extends Command { group: 'response', memberName: 'roll', description: 'Rolls a dice with a maximum value you specify.', - args: [{ - key: 'value', - prompt: 'What is the maximum number you wish to appear?', - type: 'integer' - }] + args: [ + { + key: 'value', + label: 'maximum number', + prompt: 'What is the maximum number you wish to appear?', + type: 'integer' + } + ] }); } diff --git a/commands/response/ship.js b/commands/response/ship.js index 85f50ad3..0d7ce084 100644 --- a/commands/response/ship.js +++ b/commands/response/ship.js @@ -10,11 +10,13 @@ module.exports = class ShipCommand extends Command { group: 'response', memberName: 'ship', description: 'Ships things/people together.', - args: [{ - key: 'things', - prompt: 'What do you want to ship together?', - type: 'string' - }] + args: [ + { + key: 'things', + prompt: 'What do you want to ship together?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/cuddle.js b/commands/roleplay/cuddle.js index 70024ea6..b061d883 100644 --- a/commands/roleplay/cuddle.js +++ b/commands/roleplay/cuddle.js @@ -7,11 +7,13 @@ module.exports = class CuddleCommand extends Command { group: 'roleplay', memberName: 'cuddle', description: 'Cuddles something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/divorce.js b/commands/roleplay/divorce.js index 44714ce3..b103cc49 100644 --- a/commands/roleplay/divorce.js +++ b/commands/roleplay/divorce.js @@ -7,11 +7,13 @@ module.exports = class DivorceCommand extends Command { group: 'roleplay', memberName: 'divorce', description: 'Divorces something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/eat.js b/commands/roleplay/eat.js index 130f8f07..2a7b29d5 100644 --- a/commands/roleplay/eat.js +++ b/commands/roleplay/eat.js @@ -7,11 +7,13 @@ module.exports = class EatCommand extends Command { group: 'roleplay', memberName: 'eat', description: 'Eats something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/falconpunch.js b/commands/roleplay/falconpunch.js index 6760dcd9..5959eae4 100644 --- a/commands/roleplay/falconpunch.js +++ b/commands/roleplay/falconpunch.js @@ -7,11 +7,13 @@ module.exports = class FalconPunchCommand extends Command { group: 'roleplay', memberName: 'falconpunch', description: 'Falcon Punches something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/fistbump.js b/commands/roleplay/fistbump.js index 1abfc38e..77f72a07 100644 --- a/commands/roleplay/fistbump.js +++ b/commands/roleplay/fistbump.js @@ -7,11 +7,13 @@ module.exports = class FistBumpCommand extends Command { group: 'roleplay', memberName: 'fistbump', description: 'Fistbumps something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/highfive.js b/commands/roleplay/highfive.js index eca904b6..6625d1c4 100644 --- a/commands/roleplay/highfive.js +++ b/commands/roleplay/highfive.js @@ -7,11 +7,13 @@ module.exports = class HighFivesCommand extends Command { group: 'roleplay', memberName: 'highfive', description: 'High Fives something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/hitwithshovel.js b/commands/roleplay/hitwithshovel.js index dedf180c..de986dec 100644 --- a/commands/roleplay/hitwithshovel.js +++ b/commands/roleplay/hitwithshovel.js @@ -7,11 +7,13 @@ module.exports = class HitwithShovelCommand extends Command { group: 'roleplay', memberName: 'hitwithsovel', description: 'Hits something/someone with a shovel.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/hug.js b/commands/roleplay/hug.js index b62bdd6d..b5ca705d 100644 --- a/commands/roleplay/hug.js +++ b/commands/roleplay/hug.js @@ -7,11 +7,13 @@ module.exports = class HugCommand extends Command { group: 'roleplay', memberName: 'hug', description: 'Hugs something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/inhales.js b/commands/roleplay/inhales.js index ebdd0459..4ccaf940 100644 --- a/commands/roleplay/inhales.js +++ b/commands/roleplay/inhales.js @@ -7,11 +7,13 @@ module.exports = class InhaleCommand extends Command { group: 'roleplay', memberName: 'inhale', description: 'Inhales something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/kill.js b/commands/roleplay/kill.js index 4b6b69ac..98a5e874 100644 --- a/commands/roleplay/kill.js +++ b/commands/roleplay/kill.js @@ -7,11 +7,13 @@ module.exports = class KillCommand extends Command { group: 'roleplay', memberName: 'kill', description: 'Kills something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/kiss.js b/commands/roleplay/kiss.js index 008213ab..c7a9a458 100644 --- a/commands/roleplay/kiss.js +++ b/commands/roleplay/kiss.js @@ -7,11 +7,13 @@ module.exports = class KissCommand extends Command { group: 'roleplay', memberName: 'kiss', description: 'Kisses something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/marries.js b/commands/roleplay/marries.js index b5f8caf0..c198ce89 100644 --- a/commands/roleplay/marries.js +++ b/commands/roleplay/marries.js @@ -7,11 +7,13 @@ module.exports = class MarryCommand extends Command { group: 'roleplay', memberName: 'marry', description: 'Marries something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/pat.js b/commands/roleplay/pat.js index 53cffd5c..a4caa811 100644 --- a/commands/roleplay/pat.js +++ b/commands/roleplay/pat.js @@ -7,11 +7,13 @@ module.exports = class PatCommand extends Command { group: 'roleplay', memberName: 'pat', description: 'Pats something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/poke.js b/commands/roleplay/poke.js index edcf68be..99fa8c26 100644 --- a/commands/roleplay/poke.js +++ b/commands/roleplay/poke.js @@ -7,11 +7,13 @@ module.exports = class PokeCommand extends Command { group: 'roleplay', memberName: 'poke', description: 'Pokes something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/punch.js b/commands/roleplay/punch.js index b49fe271..ce77816f 100644 --- a/commands/roleplay/punch.js +++ b/commands/roleplay/punch.js @@ -7,11 +7,13 @@ module.exports = class PunchCommand extends Command { group: 'roleplay', memberName: 'punch', description: 'Punches something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/roleplay/slap.js b/commands/roleplay/slap.js index 391eef1c..114aa6cc 100644 --- a/commands/roleplay/slap.js +++ b/commands/roleplay/slap.js @@ -7,11 +7,13 @@ module.exports = class SlapCommand extends Command { group: 'roleplay', memberName: 'slap', description: 'Slaps something/someone.', - args: [{ - key: 'thing', - prompt: 'What do you want to roleplay with?', - type: 'string' - }] + args: [ + { + key: 'thing', + prompt: 'What do you want to roleplay with?', + type: 'string' + } + ] }); } diff --git a/commands/search/botinfo.js b/commands/search/botinfo.js index 2e3cce77..97d2c85a 100644 --- a/commands/search/botinfo.js +++ b/commands/search/botinfo.js @@ -9,11 +9,13 @@ module.exports = class BotSearchCommand extends Command { group: 'search', memberName: 'botinfo', description: 'Searches Discord Bots for info on a bot.', - args: [{ - key: 'bot', - prompt: 'Which bot do you want to get information for?', - type: 'user' - }] + args: [ + { + key: 'bot', + prompt: 'Which bot do you want to get information for?', + type: 'user' + } + ] }); } diff --git a/commands/search/define.js b/commands/search/define.js index cb299b15..41f44146 100644 --- a/commands/search/define.js +++ b/commands/search/define.js @@ -9,12 +9,14 @@ module.exports = class DefineCommand extends Command { group: 'search', memberName: 'define', description: 'Defines a word.', - args: [{ - key: 'query', - prompt: 'What would you like to define?', - type: 'string', - parse: query => encodeURIComponent(query) - }] + args: [ + { + key: 'query', + prompt: 'What would you like to define?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] }); } diff --git a/commands/search/discrim.js b/commands/search/discrim.js index 8ce1a06e..83c89c63 100644 --- a/commands/search/discrim.js +++ b/commands/search/discrim.js @@ -12,16 +12,18 @@ module.exports = class DiscrimCommand extends Command { group: 'search', memberName: 'discrim', description: 'Searches for other users with a certain discriminator.', - args: [{ - key: 'discrim', - prompt: 'Which discriminator would you like to search for?', - type: 'string', - validate: discrim => { - if (/[0-9]+$/g.test(discrim) && discrim.length === 4) - return true; - return `${discrim} is not a valid discriminator.`; + args: [ + { + key: 'discrim', + prompt: 'Which discriminator would you like to search for?', + type: 'string', + validate: discrim => { + if (/[0-9]+$/g.test(discrim) && discrim.length === 4) + return true; + return `${discrim} is not a valid discriminator.`; + } } - }] + ] }); } diff --git a/commands/search/forecast.js b/commands/search/forecast.js index 584d6bc6..716a1ee8 100644 --- a/commands/search/forecast.js +++ b/commands/search/forecast.js @@ -9,11 +9,13 @@ module.exports = class ForecastCommand extends Command { group: 'search', memberName: 'forecast', description: 'Gets the seven-day forecast for a specified location.', - args: [{ - key: 'query', - prompt: 'What location would you like to get the forecast for?', - type: 'string' - }] + args: [ + { + key: 'query', + prompt: 'What location would you like to get the forecast for?', + type: 'string' + } + ] }); } diff --git a/commands/search/google.js b/commands/search/google.js index fe5d862d..d7f67dfd 100644 --- a/commands/search/google.js +++ b/commands/search/google.js @@ -10,12 +10,14 @@ module.exports = class GoogleCommand extends Command { group: 'search', memberName: 'google', description: 'Searches Google.', - args: [{ - key: 'query', - prompt: 'What would you like to search for?', - type: 'string', - parse: query => encodeURIComponent(query) - }] + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] }); } diff --git a/commands/search/imdb.js b/commands/search/imdb.js index 277aa31f..d90e8acc 100644 --- a/commands/search/imdb.js +++ b/commands/search/imdb.js @@ -9,12 +9,14 @@ module.exports = class IMDBCommand extends Command { group: 'search', memberName: 'imdb', description: 'Searches IMDB for a specified movie.', - args: [{ - key: 'query', - prompt: 'What movie or TV Show would you like to search for?', - type: 'string', - parse: query => encodeURIComponent(query) - }] + args: [ + { + key: 'query', + prompt: 'What movie or TV Show would you like to search for?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] }); } diff --git a/commands/search/lmgtfy.js b/commands/search/lmgtfy.js index af69f53e..08224004 100644 --- a/commands/search/lmgtfy.js +++ b/commands/search/lmgtfy.js @@ -7,12 +7,14 @@ module.exports = class LMGTFYCommand extends Command { group: 'search', memberName: 'lmgtfy', description: 'Responds with a LMGTFY link.', - args: [{ - key: 'query', - prompt: 'What would you like to the link to search for?', - type: 'string', - parse: query => encodeURIComponent(query) - }] + args: [ + { + key: 'query', + prompt: 'What would you like to the link to search for?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] }); } diff --git a/commands/search/map.js b/commands/search/map.js index cc313265..acec8170 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -8,21 +8,25 @@ module.exports = class MapCommand extends Command { group: 'search', memberName: 'map', description: 'Gets a map image for the location you define with the zoom level you define (1-20).', - args: [{ - key: 'zoom', - prompt: 'What would you like the zoom level for the map to be? Limit 1-20.', - type: 'integer', - validate: zoom => { - if (zoom < 21 && zoom > 0) - return true; - return 'Please enter a zoom value from 1-20'; + args: [ + { + key: 'zoom', + label: 'zoom level', + prompt: 'What would you like the zoom level for the map to be? Limit 1-20.', + type: 'integer', + validate: zoom => { + if (zoom < 21 && zoom > 0) + return true; + return 'Please enter a zoom value from 1-20'; + } + }, + { + key: 'query', + prompt: 'What location you like to get a map image for?', + type: 'string', + parse: query => encodeURIComponent(query) } - }, { - key: 'query', - prompt: 'What location you like to get a map image for?', - type: 'string', - parse: query => encodeURIComponent(query) - }] + ] }); } diff --git a/commands/search/neopet.js b/commands/search/neopet.js index d2d830eb..6c9d7e98 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -9,12 +9,14 @@ module.exports = class NeopetCommand extends Command { group: 'search', memberName: 'neopet', description: 'Gives a Neopet\'s image, searchable by name.', - args: [{ - key: 'query', - prompt: 'What pet would you like to get the image of?', - type: 'string', - parse: query => encodeURIComponent(query) - }] + args: [ + { + key: 'query', + prompt: 'What pet would you like to get the image of?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] }); } diff --git a/commands/search/osu.js b/commands/search/osu.js index c50df5f1..a1d9ea28 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -9,12 +9,14 @@ module.exports = class OsuCommand extends Command { group: 'search', memberName: 'osu', description: 'Searches Osu! user data.', - args: [{ - key: 'query', - prompt: 'What osu username would you like to search for?', - type: 'string', - parse: query => encodeURIComponent(query) - }] + args: [ + { + key: 'query', + prompt: 'What osu username would you like to search for?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] }); } diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js index 02864f02..09bcb6df 100644 --- a/commands/search/soundcloud.js +++ b/commands/search/soundcloud.js @@ -9,12 +9,14 @@ module.exports = class SoundCloudCommand extends Command { group: 'search', memberName: 'soundcloud', description: 'Searches SoundCloud for a song.', - args: [{ - key: 'query', - prompt: 'What do you want to search SoundCloud for?', - type: 'string', - parse: text => encodeURIComponent(text) - }] + args: [ + { + key: 'query', + prompt: 'What do you want to search SoundCloud for?', + type: 'string', + parse: text => encodeURIComponent(text) + } + ] }); } diff --git a/commands/search/urban.js b/commands/search/urban.js index 6faa10db..6c4c75b5 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -9,12 +9,14 @@ module.exports = class UrbanCommand extends Command { group: 'search', memberName: 'urban', description: 'Searches Urban Dictionary for a word.', - args: [{ - key: 'query', - prompt: 'What would you like to define?', - type: 'string', - parse: text => encodeURIComponent(text) - }] + args: [ + { + key: 'query', + prompt: 'What would you like to define?', + type: 'string', + parse: text => encodeURIComponent(text) + } + ] }); } diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 74b7dcea..e9a5b056 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -9,12 +9,14 @@ module.exports = class WattpadCommand extends Command { group: 'search', memberName: 'wattpad', description: 'Searches Wattpad for a book.', - args: [{ - key: 'query', - prompt: 'What book would you like to search for?', - type: 'string', - parse: text => encodeURIComponent(text) - }] + args: [ + { + key: 'query', + prompt: 'What book would you like to search for?', + type: 'string', + parse: text => encodeURIComponent(text) + } + ] }); } diff --git a/commands/search/weather.js b/commands/search/weather.js index dc41d75c..76879b24 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -9,11 +9,13 @@ module.exports = class WeatherCommand extends Command { group: 'search', memberName: 'weather', description: 'Gets weather information for a specified location.', - args: [{ - key: 'query', - prompt: 'What location would you like to get the current weather for?', - type: 'string' - }] + args: [ + { + key: 'query', + prompt: 'What location would you like to get the current weather for?', + type: 'string' + } + ] }); } diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 0f8ef83b..ed9f078e 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -9,12 +9,14 @@ module.exports = class WikipediaCommand extends Command { group: 'search', memberName: 'wikipedia', description: 'Searches Wikipedia for something.', - args: [{ - key: 'query', - prompt: 'What would you like to search for?', - type: 'string', - parse: text => encodeURIComponent(text) - }] + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string', + parse: text => encodeURIComponent(text) + } + ] }); } diff --git a/commands/search/youtube.js b/commands/search/youtube.js index 4d307e5f..cd2a7724 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -9,12 +9,14 @@ module.exports = class YouTubeCommand extends Command { group: 'search', memberName: 'youtube', description: 'Searches YouTube for a video.', - args: [{ - key: 'query', - prompt: 'What would you like to search for?', - type: 'string', - parse: text => encodeURIComponent(text) - }] + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string', + parse: text => encodeURIComponent(text) + } + ] }); } diff --git a/commands/search/yugioh.js b/commands/search/yugioh.js index cabc0915..3bffa850 100644 --- a/commands/search/yugioh.js +++ b/commands/search/yugioh.js @@ -9,12 +9,14 @@ module.exports = class YuGiOhCommand extends Command { group: 'search', memberName: 'yugioh', description: 'Gets info on a Yu-Gi-Oh! Card.', - args: [{ - key: 'query', - prompt: 'What card would you like to get data for?', - type: 'string', - parse: text => encodeURIComponent(text) - }] + args: [ + { + key: 'query', + prompt: 'What card would you like to get data for?', + type: 'string', + parse: text => encodeURIComponent(text) + } + ] }); } diff --git a/commands/textedit/binary.js b/commands/textedit/binary.js index 53137ac4..0eedda57 100644 --- a/commands/textedit/binary.js +++ b/commands/textedit/binary.js @@ -14,17 +14,19 @@ module.exports = class BinaryCommand extends Command { group: 'textedit', memberName: 'binary', description: 'Converts text to binary.', - args: [{ - key: 'text', - prompt: 'What text would you like to convert to binary?', - type: 'string', - validate: text => { - if (binary(text).length < 2000) - return true; - return 'Your message content is too long.'; - }, - parse: text => binary(text) - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to convert to binary?', + type: 'string', + validate: text => { + if (binary(text).length < 2000) + return true; + return 'Your message content is too long.'; + }, + parse: text => binary(text) + } + ] }); } diff --git a/commands/textedit/cowsay.js b/commands/textedit/cowsay.js index 6fa49acc..35a36452 100644 --- a/commands/textedit/cowsay.js +++ b/commands/textedit/cowsay.js @@ -7,16 +7,18 @@ module.exports = class CowsayCommand extends Command { group: 'textedit', memberName: 'cowsay', description: 'Converts text to cowsay.', - args: [{ - key: 'text', - prompt: 'What text would you like the cow to say?', - type: 'string', - validate: text => { - if (text.length < 1500) - return true; - return `Please keep your content under 1500 characters, you have ${text.length}.`; + args: [ + { + key: 'text', + prompt: 'What text would you like the cow to say?', + type: 'string', + validate: text => { + if (text.length < 1500) + return true; + return `Please keep your content under 1500 characters, you have ${text.length}.`; + } } - }] + ] }); } diff --git a/commands/textedit/embed.js b/commands/textedit/embed.js index 9593094c..c3bd0dee 100644 --- a/commands/textedit/embed.js +++ b/commands/textedit/embed.js @@ -8,11 +8,13 @@ module.exports = class EmbedCommand extends Command { group: 'textedit', memberName: 'embed', description: 'Sends a message in an embed.', - args: [{ - key: 'text', - prompt: 'What text would you like to embed?', - type: 'string' - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to embed?', + type: 'string' + } + ] }); } diff --git a/commands/textedit/morse.js b/commands/textedit/morse.js index 74a1a52f..f7269632 100644 --- a/commands/textedit/morse.js +++ b/commands/textedit/morse.js @@ -9,17 +9,19 @@ module.exports = class MorseCommand extends Command { group: 'textedit', memberName: 'morse', description: 'Translates text to morse code.', - args: [{ - key: 'text', - prompt: 'What text would you like to convert to morse?', - type: 'string', - validate: text => { - if (letterTrans(text, dictionary, ' ').length < 1999) - return true; - return 'Your message content is too long.'; - }, - parse: text => letterTrans(text.toLowerCase(), dictionary, ' ') - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to convert to morse?', + type: 'string', + validate: text => { + if (letterTrans(text, dictionary, ' ').length < 1999) + return true; + return 'Your message content is too long.'; + }, + parse: text => letterTrans(text.toLowerCase(), dictionary, ' ') + } + ] }); } diff --git a/commands/textedit/pirate.js b/commands/textedit/pirate.js index 744f75ac..b8726bbb 100644 --- a/commands/textedit/pirate.js +++ b/commands/textedit/pirate.js @@ -9,17 +9,19 @@ module.exports = class PirateCommand extends Command { group: 'textedit', memberName: 'pirate', description: 'Talk like a pirate!', - args: [{ - key: 'text', - prompt: 'What text would you like to convert to pirate?', - type: 'string', - validate: text => { - if (wordTrans(text, dictionary).length < 1999) - return true; - return 'Your message content is too long.'; - }, - parse: text => wordTrans(text, dictionary) - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to convert to pirate?', + type: 'string', + validate: text => { + if (wordTrans(text, dictionary).length < 1999) + return true; + return 'Your message content is too long.'; + }, + parse: text => wordTrans(text, dictionary) + } + ] }); } diff --git a/commands/textedit/reverse.js b/commands/textedit/reverse.js index dca31494..49ddc78a 100644 --- a/commands/textedit/reverse.js +++ b/commands/textedit/reverse.js @@ -7,12 +7,14 @@ module.exports = class ReverseCommand extends Command { group: 'textedit', memberName: 'reverse', description: 'Reverses text.', - args: [{ - key: 'text', - prompt: 'What text would you like to reverse?', - type: 'string', - parse: text => text.split('').reverse().join('') - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to reverse?', + type: 'string', + parse: text => text.split('').reverse().join('') + } + ] }); } diff --git a/commands/textedit/say.js b/commands/textedit/say.js index 2e48e09e..e9b94e96 100644 --- a/commands/textedit/say.js +++ b/commands/textedit/say.js @@ -13,11 +13,13 @@ module.exports = class SayCommand extends Command { memberName: 'say', description: 'Make XiaoBot say what you wish.', guildOnly: true, - args: [{ - key: 'text', - prompt: 'What text would you like XiaoBot to say?', - type: 'string' - }] + args: [ + { + key: 'text', + prompt: 'What text would you like XiaoBot to say?', + type: 'string' + } + ] }); } diff --git a/commands/textedit/temmie.js b/commands/textedit/temmie.js index 750231cc..c0dc7c83 100644 --- a/commands/textedit/temmie.js +++ b/commands/textedit/temmie.js @@ -9,17 +9,19 @@ module.exports = class TemmieCommand extends Command { group: 'textedit', memberName: 'temmie', description: 'Translate text to Temmie speak.', - args: [{ - key: 'text', - prompt: 'What text would you like to convert to Temmie speak?', - type: 'string', - validate: text => { - if (wordTrans(text, dictionary).length < 1999) - return true; - return 'Your message content is too long.'; - }, - parse: text => wordTrans(text, dictionary) - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to convert to Temmie speak?', + type: 'string', + validate: text => { + if (wordTrans(text, dictionary).length < 1999) + return true; + return 'Your message content is too long.'; + }, + parse: text => wordTrans(text, dictionary) + } + ] }); } diff --git a/commands/textedit/upsidedown.js b/commands/textedit/upsidedown.js index 61f51396..c32d2e06 100644 --- a/commands/textedit/upsidedown.js +++ b/commands/textedit/upsidedown.js @@ -12,12 +12,14 @@ module.exports = class UpsideDownCommand extends Command { group: 'textedit', memberName: 'upsidedown', description: 'Flips text upside-down.', - args: [{ - key: 'text', - prompt: 'What text would you like to flip upside-down?', - type: 'string', - parse: text => letterTrans(text, dictionary) - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to flip upside-down?', + type: 'string', + parse: text => letterTrans(text, dictionary) + } + ] }); } diff --git a/commands/textedit/webhook.js b/commands/textedit/webhook.js index d7110db5..79b8748c 100644 --- a/commands/textedit/webhook.js +++ b/commands/textedit/webhook.js @@ -13,11 +13,13 @@ module.exports = class WebhookCommand extends Command { memberName: 'webhook', description: 'Posts a message to the webhook defined in your `process.env`.', guildOnly: true, - args: [{ - key: 'text', - prompt: 'What text would you like the webhook to say?', - type: 'string' - }] + args: [ + { + key: 'content', + prompt: 'What text would you like the webhook to say?', + type: 'string' + } + ] }); } @@ -28,14 +30,12 @@ module.exports = class WebhookCommand extends Command { async run(msg, args) { if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) return msg.say('This Command requires the `Manage Messages` Permission.'); - const { text } = args; + const { content } = args; try { msg.delete(); await request .post(process.env.WEBHOOK_URL) - .send({ - content: text - }); + .send({content}); return null; } catch (err) { return msg.say('An Unknown Error Occurred.'); diff --git a/commands/textedit/zalgo.js b/commands/textedit/zalgo.js index ff7027e7..d103b6d2 100644 --- a/commands/textedit/zalgo.js +++ b/commands/textedit/zalgo.js @@ -8,18 +8,20 @@ module.exports = class ZalgoCommand extends Command { group: 'textedit', memberName: 'zalgo', description: 'Zalgoizes Text.', - args: [{ - key: 'text', - prompt: 'What text would you like to convert to zalgo?', - type: 'string', - validate: text => { - if (text.length < 500) { - return true; - } - return `Please keep your text under 500 characters, you have ${text.length}.`; - }, - parse: text => zalgo(text) - }] + args: [ + { + key: 'text', + prompt: 'What text would you like to convert to zalgo?', + type: 'string', + validate: text => { + if (text.length < 500) { + return true; + } + return `Please keep your text under 500 characters, you have ${text.length}.`; + }, + parse: text => zalgo(text) + } + ] }); } diff --git a/commands/userinfo/avatar.js b/commands/userinfo/avatar.js index 1c20f5be..5b4c3310 100644 --- a/commands/userinfo/avatar.js +++ b/commands/userinfo/avatar.js @@ -7,11 +7,13 @@ module.exports = class AvatarCommand extends Command { group: 'userinfo', memberName: 'avatar', description: 'Gives a link to a user\'s avatar.', - args: [{ - key: 'user', - prompt: 'Which user would you like to get the avatar of?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to get the avatar of?', + type: 'user' + } + ] }); } diff --git a/commands/userinfo/userinfo.js b/commands/userinfo/userinfo.js index fc558b11..b7a52949 100644 --- a/commands/userinfo/userinfo.js +++ b/commands/userinfo/userinfo.js @@ -16,11 +16,13 @@ module.exports = class UserInfoCommand extends Command { memberName: 'user', description: 'Gives some info on a user.', guildOnly: true, - args: [{ - key: 'user', - prompt: 'Which user would you like to get info on?', - type: 'user' - }] + args: [ + { + key: 'user', + prompt: 'Which user would you like to get info on?', + type: 'user' + } + ] }); } diff --git a/commands/util/clearsetting.js b/commands/util/clearsetting.js index 09c131df..29b8a184 100644 --- a/commands/util/clearsetting.js +++ b/commands/util/clearsetting.js @@ -8,16 +8,18 @@ module.exports = class ClearSettingCommand extends Command { memberName: 'clearsetting', description: 'Removes a custom-set Mod Channel, Member Channel, or Staff Role.', guildOnly: true, - args: [{ - key: 'setting', - prompt: 'What setting do you want to clear? `modLog`, `memberLog`, or `staffRole`?', - type: 'string', - validate: setting => { - if (['modLog', 'memberLog', 'staffRole'].includes(setting)) - return true; - return 'Please enter either `modLog`, `memberLog`, or `staffRole`.'; + args: [ + { + key: 'setting', + prompt: 'What setting do you want to clear? `modLog`, `memberLog`, or `staffRole`?', + type: 'string', + validate: setting => { + if (['modLog', 'memberLog', 'staffRole'].includes(setting)) + return true; + return 'Please enter either `modLog`, `memberLog`, or `staffRole`.'; + } } - }] + ] }); } diff --git a/commands/util/memberchannel.js b/commands/util/memberchannel.js index b40063ea..4bc2456e 100644 --- a/commands/util/memberchannel.js +++ b/commands/util/memberchannel.js @@ -8,11 +8,13 @@ module.exports = class MemberLogCommand extends Command { memberName: 'memberchannel', description: 'Sets the channel for the member logs to be sent.', guildOnly: true, - args: [{ - key: 'channel', - prompt: 'What is the channel you want to send logs to?', - type: 'channel' - }] + args: [ + { + key: 'channel', + prompt: 'What is the channel you want to send logs to?', + type: 'channel' + } + ] }); } diff --git a/commands/util/modchannel.js b/commands/util/modchannel.js index a21c97d7..73964dfd 100644 --- a/commands/util/modchannel.js +++ b/commands/util/modchannel.js @@ -8,11 +8,13 @@ module.exports = class ModChannelCommand extends Command { memberName: 'modchannel', description: 'Sets the channel for the mod logs to be sent.', guildOnly: true, - args: [{ - key: 'channel', - prompt: 'What is the channel you want to send logs to?', - type: 'channel' - }] + args: [ + { + key: 'channel', + prompt: 'What is the channel you want to send logs to?', + type: 'channel' + } + ] }); } diff --git a/commands/util/shardinfo.js b/commands/util/shardinfo.js index 8444d026..446d57c3 100644 --- a/commands/util/shardinfo.js +++ b/commands/util/shardinfo.js @@ -1,6 +1,5 @@ const { Command } = require('discord.js-commando'); const { RichEmbed } = require('discord.js'); -const { version } = require('../../package'); const moment = require('moment'); require('moment-duration-format'); @@ -14,11 +13,13 @@ module.exports = class ShardInfoCommand extends Command { group: 'util', memberName: 'shardinfo', description: 'Gives some bot info for the Shard you specify.', - args: [{ - key: 'shard', - prompt: 'Which Shard would you like to get data for?', - type: 'integer' - }] + args: [ + { + key: 'shard', + prompt: 'Which Shard would you like to get data for?', + type: 'integer' + } + ] }); } diff --git a/commands/util/staffrole.js b/commands/util/staffrole.js index af7b6533..21f599c5 100644 --- a/commands/util/staffrole.js +++ b/commands/util/staffrole.js @@ -8,11 +8,13 @@ module.exports = class StaffRoleCommand extends Command { memberName: 'staffrole', description: 'Sets the role that can use Mod Commands without perms.', guildOnly: true, - args: [{ - key: 'role', - prompt: 'What role should be staff?', - type: 'role' - }] + args: [ + { + key: 'role', + prompt: 'What role should be staff?', + type: 'role' + } + ] }); } diff --git a/package.json b/package.json index a53d68e6..1d33dfd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "17.2.2", + "version": "17.2.3", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {