diff --git a/commands/games/mathgame.js b/commands/games/mathgame.js index 3e2f9820..c3a2d21a 100644 --- a/commands/games/mathgame.js +++ b/commands/games/mathgame.js @@ -20,9 +20,7 @@ module.exports = class MathGameCommand extends Command { } return 'Please set the difficulty to either `easy`, `medium`, `hard`, or `extreme`.'; }, - parse: text => { - return text.toLowerCase(); - } + parse: text => text.toLowerCase() }] }); } diff --git a/commands/games/rockpaperscissors.js b/commands/games/rockpaperscissors.js index ca99369b..318c102e 100644 --- a/commands/games/rockpaperscissors.js +++ b/commands/games/rockpaperscissors.js @@ -22,9 +22,7 @@ module.exports = class RockPaperScissorsCommand extends Command { } return 'Please enter either `rock`, `paper`, or `scissors`.'; }, - parse: text => { - return text.toLowerCase(); - } + parse: text => text.toLowerCase() }] }); } diff --git a/commands/games/typinggame.js b/commands/games/typinggame.js index f7cc2312..f4adad56 100644 --- a/commands/games/typinggame.js +++ b/commands/games/typinggame.js @@ -19,9 +19,7 @@ module.exports = class TypingGameCommand extends Command { } return 'Please set the difficulty to either `easy`, `medium`, `hard`, or `extreme`.'; }, - parse: text => { - return text.toLowerCase(); - } + parse: text => text.toLowerCase() }] }); } diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index 50e5a81d..a23c5dc3 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -22,9 +22,7 @@ module.exports = class MemeCommand extends Command { } return `${type.toLowerCase()} is not a valid meme type. Use \`x;help meme\` to view a list of types.`; }, - parse: text => { - return text.toLowerCase(); - } + parse: text => text.toLowerCase() }, { key: 'toprow', prompt: 'What should the top row of the meme to be?', @@ -35,9 +33,7 @@ module.exports = class MemeCommand extends Command { } return `Please do not use special characters and keep the rows under 100 characters each, you have ${toprow.length}.`; }, - parse: text => { - return text.replace(/[ ]/g, '-').replace(/[?]/g, '~q'); - } + parse: text => text.replace(/[ ]/g, '-').replace(/[?]/g, '~q') }, { key: 'bottomrow', prompt: 'What should the bottom row of the meme to be?', @@ -48,9 +44,7 @@ module.exports = class MemeCommand extends Command { } return `Please do not use special characters and keep the rows under 100 characters each, you have ${bottomrow.length}.`; }, - parse: text => { - return text.replace(/[ ]/g, '-').replace(/[?]/g, '~q'); - } + parse: text => text.replace(/[ ]/g, '-').replace(/[?]/g, '~q') }] }); } diff --git a/commands/moderation/lockdown.js b/commands/moderation/lockdown.js index 6c52794a..3f249f25 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -18,9 +18,7 @@ module.exports = class LockdownCommand extends Command { } return 'Please enter either `start` or `stop`.'; }, - parse: text => { - return text.toLowerCase(); - } + parse: text => text.toLowerCase() }] }); } diff --git a/commands/random/easteregg.js b/commands/random/easteregg.js index 9b9da829..8c48af61 100644 --- a/commands/random/easteregg.js +++ b/commands/random/easteregg.js @@ -22,9 +22,7 @@ module.exports = class EasterEggCommand extends Command { } return 'Nope, that\'s not a valid easter egg. Try again!'; }, - parse: text => { - return text.toLowerCase(); - } + parse: text => text.toLowerCase() }] }); } diff --git a/commands/response/name.js b/commands/response/name.js index 86869f9d..b2e414c2 100644 --- a/commands/response/name.js +++ b/commands/response/name.js @@ -22,9 +22,7 @@ module.exports = class RandomNameCommand extends Command { } return 'Please enter either `male` or `female`.'; }, - parse: text => { - return text.toLowerCase(); - } + parse: text => text.toLowerCase() }] }); } diff --git a/commands/search/define.js b/commands/search/define.js index f27b7a7f..28a0315b 100644 --- a/commands/search/define.js +++ b/commands/search/define.js @@ -19,9 +19,7 @@ module.exports = class DefineCommand extends Command { key: 'word', prompt: 'What would you like to define?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/google.js b/commands/search/google.js index 1c47131f..37ea474c 100644 --- a/commands/search/google.js +++ b/commands/search/google.js @@ -17,9 +17,7 @@ module.exports = class GoogleCommand extends Command { key: 'query', prompt: 'What would you like to search for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/imdb.js b/commands/search/imdb.js index 47c42fcf..5cfabd6c 100644 --- a/commands/search/imdb.js +++ b/commands/search/imdb.js @@ -19,9 +19,7 @@ module.exports = class IMDBCommand extends Command { key: 'movie', prompt: 'What movie or TV Show would you like to search for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/lmgtfy.js b/commands/search/lmgtfy.js index aa4fec13..3b0bc0fa 100644 --- a/commands/search/lmgtfy.js +++ b/commands/search/lmgtfy.js @@ -11,9 +11,7 @@ module.exports = class LMGTFYCommand extends Command { key: 'query', prompt: 'What would you like to the link to search for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/map.js b/commands/search/map.js index 4666d4e1..54c1b5ba 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -25,9 +25,7 @@ module.exports = class MapCommand extends Command { key: 'location', prompt: 'What location you like to get a map image for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 3c518b99..5169d620 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -13,9 +13,7 @@ module.exports = class NeopetCommand extends Command { key: 'pet', prompt: 'What pet would you like to get the image of?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/osu.js b/commands/search/osu.js index 3a582889..cc399e72 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -18,9 +18,7 @@ module.exports = class OsuCommand extends Command { key: 'username', prompt: 'What osu username would you like to search for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js index 92dc816d..d888035e 100644 --- a/commands/search/soundcloud.js +++ b/commands/search/soundcloud.js @@ -17,9 +17,7 @@ module.exports = class SoundCloudCommand extends Command { key: 'query', prompt: 'What do you want to search SoundCloud for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/urban.js b/commands/search/urban.js index e3c7f6b0..33bc222f 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -18,9 +18,7 @@ module.exports = class UrbanCommand extends Command { key: 'word', prompt: 'What would you like to define?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index d430d5da..67d5e09c 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -13,9 +13,7 @@ module.exports = class WattpadCommand extends Command { key: 'book', prompt: 'What book would you like to search for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index e2b00ab1..a0316197 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -13,9 +13,7 @@ module.exports = class WikipediaCommand extends Command { key: 'query', prompt: 'What would you like to search for?', type: 'string', - parse: text => { - return encodeURIComponent(text).replace(/[)]/g, '%29'); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/youtube.js b/commands/search/youtube.js index 345df8a5..44329d9b 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -16,9 +16,7 @@ module.exports = class YouTubeCommand extends Command { key: 'video', prompt: 'What would you like to search for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/search/yugioh.js b/commands/search/yugioh.js index 36f07623..17ac4d13 100644 --- a/commands/search/yugioh.js +++ b/commands/search/yugioh.js @@ -13,9 +13,7 @@ module.exports = class YuGiOhCommand extends Command { key: 'card', prompt: 'What card would you like to get data for?', type: 'string', - parse: text => { - return encodeURIComponent(text); - } + parse: text => encodeURIComponent(text) }] }); } diff --git a/commands/textedit/binary.js b/commands/textedit/binary.js index 40058aa9..6ae9a726 100644 --- a/commands/textedit/binary.js +++ b/commands/textedit/binary.js @@ -25,9 +25,7 @@ module.exports = class BinaryCommand extends Command { } return 'Your message content is too long.'; }, - parse: text => { - return stringToBinary(text); - } + parse: text => stringToBinary(text) }] }); } diff --git a/commands/textedit/morse.js b/commands/textedit/morse.js index 6bda65f8..7fa0e0d7 100644 --- a/commands/textedit/morse.js +++ b/commands/textedit/morse.js @@ -1,5 +1,5 @@ const { Command } = require('discord.js-commando'); -const translator = require('custom-translate'); +const { letterTrans } = require('custom-translate'); const dictionary = require('./morsemappings.json'); module.exports = class MorseCommand extends Command { @@ -17,14 +17,12 @@ module.exports = class MorseCommand extends Command { prompt: 'What text would you like to convert to morse?', type: 'string', validate: content => { - if (translator.letterTrans(content, dictionary, ' ').length < 1999) { + if (letterTrans(content, dictionary, ' ').length < 1999) { return true; } return 'Your message content is too long.'; }, - parse: text => { - return translator.letterTrans(text.toLowerCase(), dictionary, ' '); - } + parse: text => letterTrans(text.toLowerCase(), dictionary, ' ') }] }); } diff --git a/commands/textedit/pirate.js b/commands/textedit/pirate.js index 0c5f084c..17e94202 100644 --- a/commands/textedit/pirate.js +++ b/commands/textedit/pirate.js @@ -1,5 +1,5 @@ const { Command } = require('discord.js-commando'); -const translator = require('custom-translate'); +const { wordTrans } = require('custom-translate'); const dictionary = require('./piratewords.json'); module.exports = class PirateCommand extends Command { @@ -18,14 +18,12 @@ module.exports = class PirateCommand extends Command { prompt: 'What text would you like to convert to pirate?', type: 'string', validate: content => { - if (translator.wordTrans(content, dictionary).length < 1999) { + if (wordTrans(content, dictionary).length < 1999) { return true; } return 'Your message content is too long.'; }, - parse: text => { - return translator.wordTrans(text, dictionary); - } + parse: text => wordTrans(text, dictionary) }] }); } diff --git a/commands/textedit/reverse.js b/commands/textedit/reverse.js index 2a97b128..d4a3aa44 100644 --- a/commands/textedit/reverse.js +++ b/commands/textedit/reverse.js @@ -11,9 +11,7 @@ module.exports = class ReverseCommand extends Command { key: 'text', prompt: 'What text would you like to reverse?', type: 'string', - parse: text => { - return text.split('').reverse().join(''); - } + parse: text => text.split('').reverse().join('') }] }); } diff --git a/commands/textedit/temmie.js b/commands/textedit/temmie.js index 62517461..71ee2f6d 100644 --- a/commands/textedit/temmie.js +++ b/commands/textedit/temmie.js @@ -1,5 +1,5 @@ const { Command } = require('discord.js-commando'); -const translator = require('custom-translate'); +const { wordTrans } = require('custom-translate'); const dictionary = require('./temmiewords.json'); module.exports = class TemmieCommand extends Command { @@ -14,14 +14,12 @@ module.exports = class TemmieCommand extends Command { prompt: 'What text would you like to convert to Temmie speak?', type: 'string', validate: content => { - if (translator.wordTrans(content, dictionary).length < 1999) { + if (wordTrans(content, dictionary).length < 1999) { return true; } return 'Your message content is too long.'; }, - parse: text => { - return translator.wordTrans(text, dictionary); - } + parse: text => wordTrans(text, dictionary) }] }); } diff --git a/commands/textedit/upsidedown.js b/commands/textedit/upsidedown.js index d66f2c93..4d45e596 100644 --- a/commands/textedit/upsidedown.js +++ b/commands/textedit/upsidedown.js @@ -1,5 +1,5 @@ const { Command } = require('discord.js-commando'); -const translator = require('custom-translate'); +const { letterTrans } = require('custom-translate'); const dictionary = require('./udmappings.json'); module.exports = class UpsideDownCommand extends Command { @@ -17,9 +17,7 @@ module.exports = class UpsideDownCommand extends Command { key: 'text', prompt: 'What text would you like to flip upside-down?', type: 'string', - parse: text => { - return translator.letterTrans(text, dictionary); - } + parse: text => letterTrans(text, dictionary) }] }); } diff --git a/commands/textedit/zalgo.js b/commands/textedit/zalgo.js index f56bf2aa..c6b8b0a0 100644 --- a/commands/textedit/zalgo.js +++ b/commands/textedit/zalgo.js @@ -18,9 +18,7 @@ module.exports = class ZalgoCommand extends Command { } return `Please keep your text under 500 characters, you have ${content.length}.`; }, - parse: text => { - return zalgo(text); - } + parse: text => zalgo(text) }] }); } diff --git a/package.json b/package.json index e6d4e5b9..4edc2d46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "31.7.0", + "version": "31.8.0", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {