From 53e1d6a8ff7209420fe4de7378ba4fac67fb8c83 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 27 Jul 2017 21:00:54 +0000 Subject: [PATCH] eslint config aqua --- .eslintrc.json | 142 ----- .gitignore | 3 - XiaoBot.js | 200 +++--- assets/json/8-ball.json | 40 +- assets/json/compliment.json | 204 +++--- assets/json/currency.json | 64 +- assets/json/easter-egg.json | 92 +-- assets/json/fact-core.json | 198 +++--- assets/json/fortune.json | 60 +- assets/json/horoscope.json | 24 +- assets/json/magic-conch.json | 12 +- assets/json/math-game.json | 38 +- assets/json/meme.json | 190 +++--- assets/json/morse.json | 80 +-- assets/json/name.json | 438 ++++++------- assets/json/permissions.json | 56 +- assets/json/pirate.json | 304 ++++----- assets/json/pokemon-fusion.json | 304 ++++----- assets/json/roast.json | 68 +- assets/json/temmie.json | 458 +++++++------- assets/json/translate.json | 186 +++--- assets/json/typing-game.json | 92 +-- assets/json/upside-down.json | 104 +-- assets/json/user-info.json | 8 +- assets/json/vocaloid.json | 80 +-- assets/json/xiao.json | 20 +- commands/avatar-edit/3000-years.js | 82 +-- commands/avatar-edit/approved.js | 82 +-- commands/avatar-edit/beautiful.js | 84 +-- commands/avatar-edit/bob-ross.js | 90 +-- commands/avatar-edit/card.js | 126 ++-- commands/avatar-edit/challenger.js | 84 +-- commands/avatar-edit/dexter.js | 84 +-- commands/avatar-edit/greyscale.js | 96 +-- commands/avatar-edit/invert.js | 92 +-- commands/avatar-edit/rejected.js | 82 +-- commands/avatar-edit/rip.js | 100 +-- commands/avatar-edit/simba.js | 84 +-- commands/avatar-edit/steam-card.js | 90 +-- commands/avatar-edit/thug-life.js | 98 +-- commands/avatar-edit/triggered.js | 92 +-- commands/avatar-edit/wanted.js | 80 +-- commands/games/battle.js | 234 +++---- commands/games/fishy.js | 24 +- commands/games/gunfight.js | 108 ++-- commands/games/hangman.js | 148 ++--- commands/games/lottery.js | 26 +- commands/games/math-game.js | 80 +-- commands/games/quiz.js | 68 +- commands/games/rock-paper-scissors.js | 72 +-- commands/games/slots.js | 48 +- commands/games/typing-game.js | 72 +-- commands/guild-info/emoji.js | 28 +- commands/guild-info/role-info.js | 79 +-- commands/guild-info/server-info.js | 66 +- commands/image-edit/achievement.js | 62 +- commands/image-edit/meme.js | 76 +-- commands/image-edit/pokemon-fusion.js | 70 +-- commands/moderation/ban.js | 154 ++--- commands/moderation/kick.js | 148 ++--- commands/moderation/lockdown.js | 74 +-- commands/moderation/prune.js | 74 +-- commands/moderation/softban.js | 156 ++--- commands/moderation/unban.js | 136 ++-- commands/moderation/warn.js | 142 ++--- commands/num-edit/currency.js | 94 +-- commands/num-edit/math.js | 48 +- commands/num-edit/temperature.js | 100 +-- commands/random-img/cat.js | 28 +- commands/random-img/danbooru.js | 62 +- commands/random-img/dog.js | 26 +- commands/random-img/gelbooru.js | 70 +-- commands/random-img/konachan.js | 62 +- commands/random-img/rule34.js | 70 +-- commands/random-img/xiao.js | 28 +- commands/random-res/8-ball.js | 46 +- commands/random-res/choose.js | 42 +- commands/random-res/chuck-norris.js | 54 +- commands/random-res/coin.js | 26 +- commands/random-res/compliment.js | 42 +- commands/random-res/fact-core.js | 24 +- commands/random-res/fortune.js | 26 +- commands/random-res/magic-conch.js | 46 +- commands/random-res/name.js | 84 +-- commands/random-res/offspring.js | 24 +- commands/random-res/quantum-coin.js | 26 +- commands/random-res/quote.js | 36 +- commands/random-res/rate-waifu.js | 42 +- commands/random-res/roast.js | 42 +- commands/random-res/roll.js | 46 +- commands/random-res/roulette.js | 24 +- commands/random-res/ship.js | 44 +- commands/random-res/today.js | 102 +-- commands/random-res/vocaloid.js | 24 +- commands/random-res/would-you-rather.js | 40 +- commands/random/easter-egg.js | 50 +- commands/random/give-flower.js | 22 +- commands/random/horoscope.js | 80 +-- commands/random/lenny.js | 22 +- commands/random/lmgtfy.js | 40 +- commands/random/portal-send.js | 72 +-- commands/random/spam.js | 24 +- commands/random/strawpoll.js | 82 +-- commands/random/xkcd.js | 106 ++-- commands/roleplay/cuddle.js | 44 +- commands/roleplay/divorce.js | 44 +- commands/roleplay/eat.js | 44 +- commands/roleplay/falcon-punch.js | 44 +- commands/roleplay/fist-bump.js | 44 +- commands/roleplay/high-five.js | 44 +- commands/roleplay/hit-with-shovel.js | 44 +- commands/roleplay/hug.js | 44 +- commands/roleplay/inhale.js | 44 +- commands/roleplay/kill.js | 44 +- commands/roleplay/kiss.js | 44 +- commands/roleplay/marry.js | 44 +- commands/roleplay/pat.js | 44 +- commands/roleplay/poke.js | 44 +- commands/roleplay/punch.js | 44 +- commands/roleplay/slap.js | 44 +- commands/search/anime.js | 90 +-- commands/search/bot-info.js | 80 +-- commands/search/bulbapedia.js | 78 +-- commands/search/define.js | 68 +- commands/search/discrim.js | 60 +- commands/search/forecast.js | 150 ++--- commands/search/giphy.js | 56 +- commands/search/manga.js | 90 +-- commands/search/map.js | 76 +-- commands/search/neopet.js | 58 +- commands/search/npm.js | 98 +-- commands/search/osu.js | 112 ++-- commands/search/pokedex.js | 90 +-- commands/search/recipe.js | 72 +-- commands/search/reddit.js | 86 +-- commands/search/soundcloud.js | 86 +-- commands/search/urban.js | 64 +- commands/search/wattpad.js | 94 +-- commands/search/weather.js | 112 ++-- commands/search/wikia.js | 96 +-- commands/search/wikipedia.js | 76 +-- commands/search/youtube.js | 74 +-- commands/search/yu-gi-oh.js | 88 +-- commands/text-edit/binary.js | 63 +- commands/text-edit/cow-say.js | 64 +- commands/text-edit/embed.js | 50 +- commands/text-edit/mocking.js | 54 +- commands/text-edit/morse.js | 48 +- commands/text-edit/pirate.js | 48 +- commands/text-edit/repeat.js | 40 +- commands/text-edit/reverse.js | 40 +- commands/text-edit/say.js | 46 +- commands/text-edit/temmie.js | 48 +- commands/text-edit/translate.js | 120 ++-- commands/text-edit/upside-down.js | 42 +- commands/text-edit/webhook.js | 54 +- commands/text-edit/zalgo.js | 48 +- commands/user-info/avatar.js | 50 +- commands/user-info/user-info.js | 86 +-- commands/util/donate.js | 32 +- commands/util/help.js | 118 ++-- commands/util/info.js | 74 +-- commands/util/invite.js | 36 +- commands/util/ping.js | 34 +- commands/util/setting-help.js | 40 +- commands/util/shard-info.js | 76 +-- commands/util/uptime.js | 24 +- commands/util/upvoters.js | 46 +- html/carbondesc.html | 45 +- html/carbonfeat.html | 142 ++--- html/carbonuse.html | 40 +- html/discordbots.html | 148 ++--- package-lock.json | 801 ------------------------ package.json | 16 +- structures/Command.js | 72 +-- structures/Util.js | 70 +-- 176 files changed, 6713 insertions(+), 7642 deletions(-) delete mode 100644 .eslintrc.json delete mode 100644 package-lock.json diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 96c307a2..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - }, - "parserOptions": { - "ecmaVersion": 2017 - }, - "rules": { - "no-compare-neg-zero": "error", - "no-extra-parens": ["warn", "all", { - "nestedBinaryExpressions": false - }], - "no-template-curly-in-string": "error", - "no-unsafe-negation": "error", - - "accessor-pairs": "warn", - "array-callback-return": "error", - "complexity": "warn", - "consistent-return": "error", - "curly": ["error", "multi-line", "consistent"], - "dot-location": ["error", "property"], - "dot-notation": "error", - "eqeqeq": "error", - "no-empty-function": "error", - "no-floating-decimal": "error", - "no-implied-eval": "error", - "no-invalid-this": "error", - "no-lone-blocks": "error", - "no-multi-spaces": "error", - "no-new-func": "error", - "no-new-wrappers": "error", - "no-new": "error", - "no-octal-escape": "error", - "no-return-assign": "error", - "no-return-await": "error", - "no-self-compare": "error", - "no-sequences": "error", - "no-throw-literal": "error", - "no-unmodified-loop-condition": "error", - "no-unused-expressions": "error", - "no-useless-call": "error", - "no-useless-concat": "error", - "no-useless-escape": "error", - "no-useless-return": "error", - "no-void": "error", - "no-warning-comments": "warn", - "prefer-promise-reject-errors": "error", - "require-await": "warn", - "wrap-iife": "error", - "yoda": "error", - - "no-label-var": "error", - "no-shadow": "error", - "no-undef-init": "error", - - "callback-return": "error", - "handle-callback-err": "error", - "no-mixed-requires": "error", - "no-new-require": "error", - "no-path-concat": "error", - "no-console": 0, - "no-var": "error", - - "array-bracket-spacing": "error", - "block-spacing": "error", - "brace-style": ["error", "1tbs", { "allowSingleLine": true }], - "capitalized-comments": ["error", "always", { "ignoreConsecutiveComments": true }], - "comma-dangle": "error", - "comma-spacing": "error", - "comma-style": "error", - "computed-property-spacing": "error", - "consistent-this": "error", - "eol-last": "error", - "func-names": "error", - "func-style": ["error", "declaration", { "allowArrowFunctions": true }], - "indent": ["error", 4, { "SwitchCase": 1 }], - "key-spacing": "error", - "keyword-spacing": ["error", { - "overrides": { - "if": { "after": true }, - "for": { "after": true }, - "while": { "after": true }, - "catch": { "after": true }, - "switch": { "after": true } - } - }], - "max-depth": ["error", 6], - "max-len": ["error", 120, 2], - "max-nested-callbacks": ["error", { "max": 4 }], - "max-statements-per-line": ["error", { "max": 2 }], - "new-cap": "error", - "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }], - "no-array-constructor": "error", - "no-bitwise": "warn", - "no-inline-comments": "error", - "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], - "no-new-object": "error", - "no-spaced-func": "error", - "no-trailing-spaces": "error", - "no-unneeded-ternary": "error", - "no-whitespace-before-property": "error", - "nonblock-statement-body-position": "error", - "object-curly-newline": "error", - "object-curly-spacing": ["error", "always"], - "operator-assignment": "error", - "operator-linebreak": ["error", "after"], - "padded-blocks": ["error", "never"], - "quote-props": ["error", "as-needed"], - "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], - "semi-spacing": "error", - "semi": "error", - "space-before-blocks": "error", - "space-before-function-paren": ["error", { - "anonymous": "never", - "named": "never", - "asyncArrow": "always" - }], - "space-in-parens": "error", - "space-infix-ops": "error", - "space-unary-ops": "error", - "spaced-comment": "error", - "template-tag-spacing": "error", - "unicode-bom": "error", - - "arrow-body-style": "error", - "arrow-parens": ["error", "always"], - "arrow-spacing": "error", - "no-duplicate-imports": "error", - "no-useless-computed-key": "error", - "no-useless-constructor": "error", - "prefer-arrow-callback": "error", - "prefer-const": "error", - "prefer-rest-params": "error", - "prefer-spread": "error", - "prefer-template": "error", - "rest-spread-spacing": "error", - "template-curly-spacing": "error", - "yield-star-spacing": "error" - } -} diff --git a/.gitignore b/.gitignore index 4e3d1e5f..ce613ac4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# Packages node_modules/ - -# Log Files logs/ *.log diff --git a/XiaoBot.js b/XiaoBot.js index c2d437bc..cea5f467 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -2,56 +2,56 @@ const { token, owner, prefix, invite } = require('./config'); const path = require('path'); const { CommandoClient } = require('discord.js-commando'); const client = new CommandoClient({ - commandPrefix: prefix, - owner, - invite, - disableEveryone: true, - unknownCommandResponse: false, - disabledEvents: [ - 'TYPING_START', - 'VOICE_STATE_UPDATE', - 'FRIEND_ADD', - 'FRIEND_REMOVE' - ], - messageCacheLifetime: 60, - messageSweepInterval: 60 + commandPrefix: prefix, + owner, + invite, + disableEveryone: true, + unknownCommandResponse: false, + disabledEvents: [ + 'TYPING_START', + 'VOICE_STATE_UPDATE', + 'FRIEND_ADD', + 'FRIEND_REMOVE' + ], + messageCacheLifetime: 60, + messageSweepInterval: 60 }); const { carbon, dBots, dBotsOrg } = require('./structures/Util'); client.registry - .registerDefaultTypes() - .registerGroups([ - ['util', 'Utility'], - ['user-info', 'User Info'], - ['guild-info', 'Server Info'], - ['moderation', 'Moderation'], - ['random-res', 'Random Response'], - ['random-img', 'Random Image'], - ['image-edit', 'Image Manipulation'], - ['avatar-edit', 'Avatar Manipulation'], - ['text-edit', 'Text Manipulation'], - ['num-edit', 'Number Manipulation'], - ['search', 'Search'], - ['games', 'Games'], - ['random', 'Random/Other'], - ['roleplay', 'Roleplay'] - ]) - .registerDefaultCommands({ - help: false, - ping: false, - prefix: false, - commandState: false - }) - .registerCommandsIn(path.join(__dirname, 'commands')); + .registerDefaultTypes() + .registerGroups([ + ['util', 'Utility'], + ['user-info', 'User Info'], + ['guild-info', 'Server Info'], + ['moderation', 'Moderation'], + ['random-res', 'Random Response'], + ['random-img', 'Random Image'], + ['image-edit', 'Image Manipulation'], + ['avatar-edit', 'Avatar Manipulation'], + ['text-edit', 'Text Manipulation'], + ['num-edit', 'Number Manipulation'], + ['search', 'Search'], + ['games', 'Games'], + ['random', 'Random/Other'], + ['roleplay', 'Roleplay'] + ]) + .registerDefaultCommands({ + help: false, + ping: false, + prefix: false, + commandState: false + }) + .registerCommandsIn(path.join(__dirname, 'commands')); client.on('ready', () => { - console.log(`[READY] Shard ${client.shard.id} Logged in as ${client.user.tag} (${client.user.id})!`); - client.user.setGame(`${prefix}help | Shard ${client.shard.id}`); + console.log(`[READY] Shard ${client.shard.id} Logged in as ${client.user.tag} (${client.user.id})!`); + client.user.setGame(`${prefix}help | Shard ${client.shard.id}`); }); -client.on('disconnect', (event) => { - console.log(`[DISCONNECT] Shard ${client.shard.id} disconnected with Code ${event.code}.`); - process.exit(0); +client.on('disconnect', event => { + console.log(`[DISCONNECT] Shard ${client.shard.id} disconnected with Code ${event.code}.`); + process.exit(0); }); client.on('error', console.error); @@ -60,73 +60,73 @@ client.on('warn', console.warn); client.on('commandError', (command, err) => console.error(command.name, err)); -client.on('message', async (msg) => { - if (!msg.guild || msg.author.bot) return; - const topic = msg.guild.defaultChannel.topic || ''; - if (!topic.toLowerCase().includes('')) return; - const member = await msg.guild.fetchMember(msg.author); - if (member.hasPermission('ADMINISTRATOR')) return; - if (/(discord(\.gg\/|app\.com\/invite\/|\.me\/))/gi.test(msg.content)) { - if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) msg.delete(); - msg.reply('Invites are prohibited from being posted here.'); - } +client.on('message', async msg => { + if (!msg.guild || msg.author.bot) return; + const topic = msg.guild.defaultChannel.topic || ''; + if (!topic.toLowerCase().includes('')) return; + const member = await msg.guild.fetchMember(msg.author); + if (member.hasPermission('ADMINISTRATOR')) return; + if (/discord(\.gg\/|app\.com\/invite\/|\.me\/)/gi.test(msg.content)) { + if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) msg.delete(); + msg.reply('Invites are prohibited from being posted here.'); + } }); -client.on('guildMemberAdd', (member) => { - const channel = member.guild.channels.filter((c) => { - const topic = c.topic || ''; - if (topic.includes('')) return true; - else return false; - }).first() || member.guild.channels.find('name', 'member-log'); - if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return; - const parseMsg = (topic) => { - if (!topic || !/(.+<\/joinmessage>)/gi.test(topic)) return ''; - const setting = topic.match(/(.+<\/joinmessage>)/gi)[0]; - return setting.slice(13, setting.length - 14) - .replace(/(\(member\))/gi, member.user.username) - .replace(/(\(server\))/gi, member.guild.name) - .replace(/(\(mention\))/gi, member.toString()); - }; - const msg = channel.topic ? parseMsg(channel.topic) : ''; - channel.send(msg || `Welcome ${member.user.username}!`); +client.on('guildMemberAdd', member => { + const channel = member.guild.channels.filter(c => { + const topic = c.topic || ''; + if (topic.includes('')) return true; + return false; + }).first() || member.guild.channels.find('name', 'member-log'); + if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return; + const parseMsg = topic => { + if (!topic || !/.+<\/joinmessage>/gi.test(topic)) return ''; + const setting = topic.match(/.+<\/joinmessage>/gi)[0]; + return setting.slice(13, setting.length - 14) + .replace(/\(member\)/gi, member.user.username) + .replace(/\(server\)/gi, member.guild.name) + .replace(/\(mention\)/gi, member.toString()); + }; + const msg = channel.topic ? parseMsg(channel.topic) : ''; + channel.send(msg || `Welcome ${member.user.username}!`); }); -client.on('guildMemberRemove', (member) => { - const channel = member.guild.channels.filter((c) => { - const topic = c.topic || ''; - if (topic.includes('')) return true; - else return false; - }).first() || member.guild.channels.find('name', 'member-log'); - if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return; - const parseMsg = (topic) => { - if (!topic || !/(.+<\/leavemessage>)/gi.test(topic)) return ''; - const setting = topic.match(/(.+<\/leavemessage>)/gi)[0]; - return setting.slice(14, setting.length - 15) - .replace(/(\(member\))/gi, member.user.username) - .replace(/(\(server\))/gi, member.guild.name) - .replace(/(\(mention\))/gi, member.toString()); - }; - const msg = channel.topic ? parseMsg(channel.topic) : ''; - channel.send(msg || `Bye ${member.user.username}...`); +client.on('guildMemberRemove', member => { + const channel = member.guild.channels.filter(c => { + const topic = c.topic || ''; + if (topic.includes('')) return true; + return false; + }).first() || member.guild.channels.find('name', 'member-log'); + if (!channel || !channel.permissionsFor(client.user).has('SEND_MESSAGES')) return; + const parseMsg = topic => { + if (!topic || !/.+<\/leavemessage>/gi.test(topic)) return ''; + const setting = topic.match(/.+<\/leavemessage>/gi)[0]; + return setting.slice(14, setting.length - 15) + .replace(/\(member\)/gi, member.user.username) + .replace(/\(server\)/gi, member.guild.name) + .replace(/\(mention\)/gi, member.toString()); + }; + const msg = channel.topic ? parseMsg(channel.topic) : ''; + channel.send(msg || `Bye ${member.user.username}...`); }); -client.on('guildCreate', async (guild) => { - console.log(`[GUILD] I have joined ${guild.name}! (${guild.id})`); - const guilds = await client.shard.fetchClientValues('guilds.size'); - const count = guilds.reduce((prev, val) => prev + val, 0); - carbon(count); - dBots(count, client.user.id); - dBotsOrg(count, client.user.id); +client.on('guildCreate', async guild => { + console.log(`[GUILD] I have joined ${guild.name}! (${guild.id})`); + const guilds = await client.shard.fetchClientValues('guilds.size'); + const count = guilds.reduce((prev, val) => prev + val, 0); + carbon(count); + dBots(count, client.user.id); + dBotsOrg(count, client.user.id); }); -client.on('guildDelete', async (guild) => { - console.log(`[GUILD] I have left ${guild.name}... (${guild.id})`); - const guilds = await client.shard.fetchClientValues('guilds.size'); - const count = guilds.reduce((prev, val) => prev + val, 0); - carbon(count); - dBots(count, client.user.id); - dBotsOrg(count, client.user.id); +client.on('guildDelete', async guild => { + console.log(`[GUILD] I have left ${guild.name}... (${guild.id})`); + const guilds = await client.shard.fetchClientValues('guilds.size'); + const count = guilds.reduce((prev, val) => prev + val, 0); + carbon(count); + dBots(count, client.user.id); + dBotsOrg(count, client.user.id); }); client.login(token); diff --git a/assets/json/8-ball.json b/assets/json/8-ball.json index f5f1df62..594a66b2 100644 --- a/assets/json/8-ball.json +++ b/assets/json/8-ball.json @@ -1,22 +1,22 @@ [ - "It is certain", - "It is decidedly so", - "Without a doubt", - "Yes definitely", - "You may rely on it", - "As I see it, yes", - "Most likely", - "Outlook good", - "Yes", - "Signs point to yes", - "Reply hazy try again", - "Ask again later", - "Better not tell you now", - "Cannot predict now", - "Concentrate and ask again", - "Don't count on it", - "My reply is no", - "My sources say no", - "Outlook not so good", - "Very doubtful" + "It is certain", + "It is decidedly so", + "Without a doubt", + "Yes definitely", + "You may rely on it", + "As I see it, yes", + "Most likely", + "Outlook good", + "Yes", + "Signs point to yes", + "Reply hazy try again", + "Ask again later", + "Better not tell you now", + "Cannot predict now", + "Concentrate and ask again", + "Don't count on it", + "My reply is no", + "My sources say no", + "Outlook not so good", + "Very doubtful" ] diff --git a/assets/json/compliment.json b/assets/json/compliment.json index ece67ca0..ef0a47b3 100644 --- a/assets/json/compliment.json +++ b/assets/json/compliment.json @@ -1,104 +1,104 @@ [ - "Your smile is contagious.", - "You look great today.", - "You're a smart cookie.", - "I bet you make babies smile.", - "You have impeccable manners.", - "I like your style.", - "You have the best laugh.", - "I appreciate you.", - "You are the most perfect you there is.", - "You are enough.", - "You're strong.", - "Your perspective is refreshing.", - "You're an awesome friend.", - "You light up the room.", - "You shine brighter than a shooting star.", - "You deserve a hug right now.", - "You should be proud of yourself.", - "You're more helpful than you realize.", - "You have a great sense of humor.", - "You've got all the right moves!", - "Is that your picture next to 'charming' in the dictionary?", - "Your kindness is a balm to all who encounter it.", - "You're all that and a super-size bag of chips.", - "On a scale from 1 to 10, you're an 11.", - "You are brave.", - "You're even more beautiful on the inside than you are on the outside.", - "You have the courage of your convictions.", - "Your eyes are breathtaking.", - "If cartoon bluebirds were real, a bunch of them would be sitting on your shoulders singing right now.", - "You are making a difference.", - "You're like sunshine on a rainy day.", - "You bring out the best in other people.", - "Your ability to recall random factoids at just the right time is impressive.", - "You're a great listener.", - "How is it that you always look great, even in sweatpants?", - "Everything would be better if more people were like you!", - "I bet you sweat glitter.", - "You were cool way before hipsters were cool.", - "That color is perfect on you.", - "Hanging out with you is always a blast.", - "You always know -- and say -- exactly what I need to hear when I need to hear it.", - "You smell really good.", - "You may dance like no one's watching, but everyone's watching because you're an amazing dancer!", - "Being around you makes everything better!", - "When you say, 'I meant to do that,' I totally believe you.", - "When you're not afraid to be yourself is when you're most incredible.", - "Colors seem brighter when you're around.", - "You're more fun than a ball pit filled with candy. (And seriously, what could be more fun than that?)", - "That thing you don't like about yourself is what makes you so interesting.", - "You're wonderful.", - "You have cute elbows. For reals!", - "Jokes are funnier when you tell them.", - "You're better than a triple-scoop ice cream cone. With sprinkles.", - "Your bellybutton is kind of adorable.", - "Your hair looks stunning.", - "You're one of a kind!", - "You're inspiring.", - "If you were a box of crayons, you'd be the giant name-brand one with the built-in sharpener.", - "You should be thanked more often. So thank you!!", - "Our community is better because you're in it.", - "Someone is getting through something hard right now because you've got their back.", - "You have the best ideas.", - "You always know how to find that silver lining.", - "Everyone gets knocked down sometimes, but you always get back up and keep going.", - "You're a candle in the darkness.", - "You're a great example to others.", - "Being around you is like being on a happy little vacation.", - "You always know just what to say.", - "You're always learning new things and trying to better yourself, which is awesome.", - "If someone based an Internet meme on you, it would have impeccable grammar.", - "You could survive a Zombie apocalypse.", - "You're more fun than bubble wrap.", - "When you make a mistake, you fix it.", - "Who raised you? They deserve a medal for a job well done.", - "You're great at figuring stuff out.", - "Your voice is magnificent.", - "The people you love are lucky to have you in their lives.", - "You're like a breath of fresh air.", - "You're gorgeous -- and that's the least interesting thing about you, too.", - "You're so thoughtful.", - "Your creative potential seems limitless.", - "Your name suits you to a T.", - "You're irresistible when you blush.", - "Actions speak louder than words, and yours tell an incredible story.", - "Somehow you make time stop and fly at the same time.", - "When you make up your mind about something, nothing stands in your way.", - "You seem to really know who you are.", - "Any team would be lucky to have you on it.", - "In high school I bet you were voted 'most likely to keep being awesome.'", - "I bet you do the crossword puzzle in ink.", - "Babies and small animals probably love you.", - "If you were a scented candle they'd call it Perfectly Imperfect (and it would smell like summer).", - "There's ordinary, and then there's you.", - "You're someone's reason to smile.", - "You're even better than a unicorn, because you're real.", - "How do you keep being so funny and making everyone laugh?", - "You have a good head on your shoulders.", - "Has anyone ever told you that you have great posture?", - "The way you treasure your loved ones is incredible.", - "You're really something special.", - "You're a gift to those around you.", - "You don't deserve it." + "Your smile is contagious.", + "You look great today.", + "You're a smart cookie.", + "I bet you make babies smile.", + "You have impeccable manners.", + "I like your style.", + "You have the best laugh.", + "I appreciate you.", + "You are the most perfect you there is.", + "You are enough.", + "You're strong.", + "Your perspective is refreshing.", + "You're an awesome friend.", + "You light up the room.", + "You shine brighter than a shooting star.", + "You deserve a hug right now.", + "You should be proud of yourself.", + "You're more helpful than you realize.", + "You have a great sense of humor.", + "You've got all the right moves!", + "Is that your picture next to 'charming' in the dictionary?", + "Your kindness is a balm to all who encounter it.", + "You're all that and a super-size bag of chips.", + "On a scale from 1 to 10, you're an 11.", + "You are brave.", + "You're even more beautiful on the inside than you are on the outside.", + "You have the courage of your convictions.", + "Your eyes are breathtaking.", + "If cartoon bluebirds were real, a bunch of them would be sitting on your shoulders singing right now.", + "You are making a difference.", + "You're like sunshine on a rainy day.", + "You bring out the best in other people.", + "Your ability to recall random factoids at just the right time is impressive.", + "You're a great listener.", + "How is it that you always look great, even in sweatpants?", + "Everything would be better if more people were like you!", + "I bet you sweat glitter.", + "You were cool way before hipsters were cool.", + "That color is perfect on you.", + "Hanging out with you is always a blast.", + "You always know -- and say -- exactly what I need to hear when I need to hear it.", + "You smell really good.", + "You may dance like no one's watching, but everyone's watching because you're an amazing dancer!", + "Being around you makes everything better!", + "When you say, 'I meant to do that,' I totally believe you.", + "When you're not afraid to be yourself is when you're most incredible.", + "Colors seem brighter when you're around.", + "You're more fun than a ball pit filled with candy. (And seriously, what could be more fun than that?)", + "That thing you don't like about yourself is what makes you so interesting.", + "You're wonderful.", + "You have cute elbows. For reals!", + "Jokes are funnier when you tell them.", + "You're better than a triple-scoop ice cream cone. With sprinkles.", + "Your bellybutton is kind of adorable.", + "Your hair looks stunning.", + "You're one of a kind!", + "You're inspiring.", + "If you were a box of crayons, you'd be the giant name-brand one with the built-in sharpener.", + "You should be thanked more often. So thank you!!", + "Our community is better because you're in it.", + "Someone is getting through something hard right now because you've got their back.", + "You have the best ideas.", + "You always know how to find that silver lining.", + "Everyone gets knocked down sometimes, but you always get back up and keep going.", + "You're a candle in the darkness.", + "You're a great example to others.", + "Being around you is like being on a happy little vacation.", + "You always know just what to say.", + "You're always learning new things and trying to better yourself, which is awesome.", + "If someone based an Internet meme on you, it would have impeccable grammar.", + "You could survive a Zombie apocalypse.", + "You're more fun than bubble wrap.", + "When you make a mistake, you fix it.", + "Who raised you? They deserve a medal for a job well done.", + "You're great at figuring stuff out.", + "Your voice is magnificent.", + "The people you love are lucky to have you in their lives.", + "You're like a breath of fresh air.", + "You're gorgeous -- and that's the least interesting thing about you, too.", + "You're so thoughtful.", + "Your creative potential seems limitless.", + "Your name suits you to a T.", + "You're irresistible when you blush.", + "Actions speak louder than words, and yours tell an incredible story.", + "Somehow you make time stop and fly at the same time.", + "When you make up your mind about something, nothing stands in your way.", + "You seem to really know who you are.", + "Any team would be lucky to have you on it.", + "In high school I bet you were voted 'most likely to keep being awesome.'", + "I bet you do the crossword puzzle in ink.", + "Babies and small animals probably love you.", + "If you were a scented candle they'd call it Perfectly Imperfect (and it would smell like summer).", + "There's ordinary, and then there's you.", + "You're someone's reason to smile.", + "You're even better than a unicorn, because you're real.", + "How do you keep being so funny and making everyone laugh?", + "You have a good head on your shoulders.", + "Has anyone ever told you that you have great posture?", + "The way you treasure your loved ones is incredible.", + "You're really something special.", + "You're a gift to those around you.", + "You don't deserve it." ] diff --git a/assets/json/currency.json b/assets/json/currency.json index 6e57fbf1..06fe2787 100644 --- a/assets/json/currency.json +++ b/assets/json/currency.json @@ -1,34 +1,34 @@ [ - "AUD", - "USD", - "BGN", - "BRL", - "CAD", - "CHF", - "CNY", - "CZK", - "DKK", - "GBP", - "HKD", - "HRK", - "HUF", - "IDR", - "ILS", - "INR", - "JPY", - "KRW", - "MXN", - "MYR", - "NOK", - "NZD", - "PHP", - "PLN", - "RON", - "RUB", - "SEK", - "SGD", - "THB", - "TRY", - "ZAR", - "EUR" + "AUD", + "USD", + "BGN", + "BRL", + "CAD", + "CHF", + "CNY", + "CZK", + "DKK", + "GBP", + "HKD", + "HRK", + "HUF", + "IDR", + "ILS", + "INR", + "JPY", + "KRW", + "MXN", + "MYR", + "NOK", + "NZD", + "PHP", + "PLN", + "RON", + "RUB", + "SEK", + "SGD", + "THB", + "TRY", + "ZAR", + "EUR" ] diff --git a/assets/json/easter-egg.json b/assets/json/easter-egg.json index adb04d61..73f68368 100644 --- a/assets/json/easter-egg.json +++ b/assets/json/easter-egg.json @@ -1,48 +1,48 @@ { - "if900hp": "All cars unlocked!", - "i'm an easter egg": "You're also an example.", - "not a valid tag": "No, it's not valid at all.", - "tag": "This command is *easter egg*, not *tag* :yum:", - "easter egg": ":egg:", - "snek": "*Blame :snake:*", - "snekfetch": "superagent is better.", - "xiaobot": "That's my name.", - "dragonfire535": "http://dragonfire535.tk", - "heroes of dreamland": "https://www.wattpad.com/story/8712240-heroes-of-dreamland-book-1-kirby-and-the-monstrous", - "neopets": "I got robbed by the pant devil.", - "koneko-chan": "https://i.ytimg.com/vi/YStwTmG4Ex0/hqdefault.jpg", - "shrug": "¯\\_(ツ)_/¯", - "vulcan": ":vulcan:", - "soundboard": "Rest in Peace...", - "me": "You.", - "no u": "no u", - "eat pant": "https://i.redd.it/226fiufo2slx.jpg", - "i never asked for this": "https://cdn.discordapp.com/attachments/252317073814978561/304811008457834516/image.jpg", - "egg": "You're an egg.", - "beta": "https://cdn.discordapp.com/attachments/252317073814978561/304812045851688963/image.jpg", - "pathetic": "https://cdn.discordapp.com/attachments/252317073814978561/304812045851688963/image.jpg", - "swagolor": "https://cdn.discordapp.com/attachments/252317073814978561/306110096491151363/Swagolor.png", - "canyounot": "Can YOU not?", - "slowclap": "*slow clap*", - "just do it": "https://www.youtube.com/watch?v=ZXsQAXx_ao0", - "april": "https://i.imgur.com/c60iG3E.png", - "captain karen": "https://i.imgur.com/8TFq5If.jpg", - "karen": "https://i.imgur.com/a4ZbCiO.png", - "rules": "https://i.imgur.com/PYeFBU5.png", - "book1": "Book.", - "new": "Nope, not quite yet.", - "adam": "Adam pls.", - "token": "[READACTED]", - "nom": "https://cdn.discordapp.com/attachments/256055608279695360/308434352377954304/tumblr_ojzfs3jjoJ1qz64n4o1_540.gif", - "good vs evil": "https://cdn.discordapp.com/attachments/256055608279695360/308404323392684033/837631b64ef351ddabe8c2200c2feca54d81af62_hq.jpg", - "ebearskittychan": "The best :heart:", - "i am your father": "NOOOOOOOOOOOOOO!", - "waifu": "I'm your waifu, right?", - "no": "yes", - "miki": "Pure Evil.", - "pokemon": "Gotta catch 'em all.", - "angery": "https://cdn.discordapp.com/attachments/256055608279695360/308701431165091840/angerey.png", - "banana": "https://cdn.discordapp.com/attachments/256055608279695360/308771979010244618/vfy6JExK7Ryhi.gif", - "yuno gasai": "https://cdn.discordapp.com/attachments/256055608279695360/308658394766508033/ff79c3c19cf7e6fdc00c1c26c204c3f6.jpg", - "why": "https://www.youtube.com/watch?v=sluHwh3hJhI" + "if900hp": "All cars unlocked!", + "i'm an easter egg": "You're also an example.", + "not a valid tag": "No, it's not valid at all.", + "tag": "This command is *easter egg*, not *tag* :yum:", + "easter egg": ":egg:", + "snek": "*Blame :snake:*", + "snekfetch": "superagent is better.", + "xiaobot": "That's my name.", + "dragonfire535": "http://dragonfire535.tk", + "heroes of dreamland": "https://www.wattpad.com/story/8712240-heroes-of-dreamland-book-1-kirby-and-the-monstrous", + "neopets": "I got robbed by the pant devil.", + "koneko-chan": "https://i.ytimg.com/vi/YStwTmG4Ex0/hqdefault.jpg", + "shrug": "¯\\_(ツ)_/¯", + "vulcan": ":vulcan:", + "soundboard": "Rest in Peace...", + "me": "You.", + "no u": "no u", + "eat pant": "https://i.redd.it/226fiufo2slx.jpg", + "i never asked for this": "https://cdn.discordapp.com/attachments/252317073814978561/304811008457834516/image.jpg", + "egg": "You're an egg.", + "beta": "https://cdn.discordapp.com/attachments/252317073814978561/304812045851688963/image.jpg", + "pathetic": "https://cdn.discordapp.com/attachments/252317073814978561/304812045851688963/image.jpg", + "swagolor": "https://cdn.discordapp.com/attachments/252317073814978561/306110096491151363/Swagolor.png", + "canyounot": "Can YOU not?", + "slowclap": "*slow clap*", + "just do it": "https://www.youtube.com/watch?v=ZXsQAXx_ao0", + "april": "https://i.imgur.com/c60iG3E.png", + "captain karen": "https://i.imgur.com/8TFq5If.jpg", + "karen": "https://i.imgur.com/a4ZbCiO.png", + "rules": "https://i.imgur.com/PYeFBU5.png", + "book1": "Book.", + "new": "Nope, not quite yet.", + "adam": "Adam pls.", + "token": "[READACTED]", + "nom": "https://cdn.discordapp.com/attachments/256055608279695360/308434352377954304/tumblr_ojzfs3jjoJ1qz64n4o1_540.gif", + "good vs evil": "https://cdn.discordapp.com/attachments/256055608279695360/308404323392684033/837631b64ef351ddabe8c2200c2feca54d81af62_hq.jpg", + "ebearskittychan": "The best :heart:", + "i am your father": "NOOOOOOOOOOOOOO!", + "waifu": "I'm your waifu, right?", + "no": "yes", + "miki": "Pure Evil.", + "pokemon": "Gotta catch 'em all.", + "angery": "https://cdn.discordapp.com/attachments/256055608279695360/308701431165091840/angerey.png", + "banana": "https://cdn.discordapp.com/attachments/256055608279695360/308771979010244618/vfy6JExK7Ryhi.gif", + "yuno gasai": "https://cdn.discordapp.com/attachments/256055608279695360/308658394766508033/ff79c3c19cf7e6fdc00c1c26c204c3f6.jpg", + "why": "https://www.youtube.com/watch?v=sluHwh3hJhI" } diff --git a/assets/json/fact-core.json b/assets/json/fact-core.json index 54664193..dbcf1094 100644 --- a/assets/json/fact-core.json +++ b/assets/json/fact-core.json @@ -1,101 +1,101 @@ [ - "The billionth digit of Pi is 9.", - "Humans can survive underwater. But not for very long.", - "A nanosecond lasts one billionth of a second.", - "Honey does not spoil.", - "The atomic weight of Germanium is seven two point four six.", - "An ostrich's eye is bigger than its brain.", - "Rats cannot throw up.", - "Iguanas can stay underwater for twenty-eight point seven minutes.", - "The moon orbits the Earth every 27.32 days.", - "A gallon of water weighs 8.34 pounds.", - "According to Norse legend, thunder god Thor's chariot was pulled across the sky by two goats.", - "Tungsten has the highest melting point of any metal, at 3,410 degrees Celsius.", - "Gently cleaning the tongue twice a day is the most effective way to fight bad breath.", - "The Tariff Act of 1789, established to protect domestic manufacture, was the second salute ever enacted by the United States government.", - "The value of Pi is the ratio of any circle's circumference to its diameter in Euclidean space.", - "The Mexican-American War ended in 1848 with the signing of the Treaty of Guadalupe Hidalgo.", - "In 1879, Sandford Fleming first proposed the adoption of worldwide standardized time zones at the Royal Canadian Institute.", - "Marie Curie invented the theory of radioactivity, the treatment of radioactivity, and the dying of radioactivity.", - "At the end of The Seagull by Anton Chekhov, Konstantin kills himself.", - "Hot water freezes quicker than cold water.", - "The situation you are in is very dangerous.", - "Polymerase I polypeptide A is a human gene.", - "The sun is 333,330 times larger than Earth.", - "Dental floss has superb tensile strength.", - "Raseph, the Semitic god of war and plague, had a gazelle growing out of his forehead.", - "Human tapeworms can grow up to twenty-two point nine meters.", - "If you have trouble with simple counting, use the following mnemonic device: one comes before two comes before 60 comes after 12 comes before six trillion comes after 504. This should make your earlier counting difficulties seem like no big deal.", - "The first person to prove that cow's milk is drinkable was very, very thirsty.", - "Roman toothpaste was made with human urine. Urine as an ingredient in toothpaste continued to be used up until the 18th century.", - "Volcano-ologists are experts in the study of volcanoes.", - "In Victorian England, a commoner was not allowed to look directly at the Queen, due to a belief at the time that the poor had the ability to steal thoughts. Science now believes that less than 4 percent of poor people are able to do this.", - "Cellular phones will not give you cancer. Only hepatitis.", - "In Greek myth, Prometheus stole fire from the Gods and gave it to humankind. The jewelry he kept for himself.", - "The Schrodinger's cat paradox outlines a situation in which a cat in a box must be considered, for all intents and purposes, simultaneously alive and dead. Schrodinger created this paradox as a justification for killing cats.", - "In 1862, Abraham Lincoln signed the Emancipation Proclamation, freeing the slaves. Like everything he did, Lincoln freed the slaves while sleepwalking, and later had no memory of the event.", - "The plural of surgeon general is surgeons general. The past tense of surgeons general is surgeonsed general.", - "Contrary to popular belief, the Eskimo does not have one hundred different words for snow. They do, however, have two hundred and thirty-four words for fudge.", - "Halley's Comet can be viewed orbiting Earth every seventy-six years. For the other seventy-five, it retreats to the heart of the sun, where it hibernates undisturbed.", - "The first commercial airline flight took to the air in 1914. Everyone involved screamed the entire way.", - "Edmund Hillary, the first person to climb Mount Everest, did so accidentally while chasing a bird.", - "We will both die because of your negligence.", - "This is a bad plan. You will fail.", - "He will most likely kill you, violently.", - "He will most likely kill you.", - "You will be dead soon.", - "You are going to die in this room.", - "The Fact Sphere is a good person, whose insights are relevant.", - "The Fact Sphere is a good sphere, with many friends.", - "Dreams are the subconscious mind's way of reminding people to go to school naked and have their teeth fall out.", - "The square root of rope is string.", - "89 percent of magic tricks are not actually magic. Technically, they are sorcery.", - "At some point in their lives 1 in 6 children will be abducted by the Dutch.", - "According to most advanced algorithms, the world's best name is Craig.", - "To make a photocopier, simply photocopy a mirror.", - "Whales are twice as intelligent, and three times as delicious, as humans.", - "Pants were invented by sailors in the sixteenth century to avoid Poseiden's wrath. It was believed that the sight of naked sailors angered the sea god.", - "In Greek myth, the craftsman Daedalus invented human flight so a group of Minotaurs would stop teasing him about it.", - "The average life expectancy of a rhinoceros in captivity is 15 years.", - "China produces the world's second largest crop of soybeans.", - "In 1948, at the request of a dying boy, baseball legend Babe Ruth ate seventy-five hot dogs, then died of hot dog poisoning.", - "William Shakespeare did not exist. His plays were masterminded in 1589 by Francis Bacon, who used a Ouija board to enslave play-writing ghosts.", - "It is incorrectly noted that Thomas Edison invented push-ups in 1878. Nikolai Tesla had in fact patented the activity three years earlier, under the name Tesla-cize.", - "The automobile brake was not invented until 1895. Before this, someone had to remain in the car at all times, driving in circles until passengers returned from their errands.", - "The most poisonous fish in the world is the orange ruffy. Everything but its eyes are made of deadly poison. The ruffy's eyes are composed of a less harmful, deadly poison.", - "The occupation of court jester was invented accidentally, when a vassal's epilepsy was mistaken for capering.", - "Before the Wright Brothers invented the airplane, anyone wanting to fly anywhere was required to eat 200 pounds of helium.", - "Before the invention of scrambled eggs in 1912, the typical breakfast was either whole eggs still in the shell or scrambled rocks.", - "During the Great Depression, the Tennessee Valley Authority outlawed pet rabbits, forcing many to hot glue-gun long ears onto their pet mice.", - "The situation is hopeless.", - "Diamonds are made when coal is put under intense pressure. Diamonds put under intense pressure become foam pellets, commonly used today as packing material.", - "Corruption is at 25 percent.", - "Corruption is at 50 percent.", - "Fact: Space does not exist.", - "The Fact Sphere is not defective. Its facts are wholly accurate and very interesting.", - "The Fact Sphere is always right.", - "You will never go into space.", - "The Space Sphere will never go to space.", - "While the submarine is vastly superior to the boat in every way, over 97 percent of people still use boats for aquatic transportation.", - "The likelihood of you dying within the next five minutes is eighty-seven point six one percent.", - "The likelihood of you dying violently within the next five minutes is eighty-seven point six one percent.", - "You are about to get me killed.", - "The Fact Sphere is the most intelligent sphere.", - "The Fact Sphere is the most handsome sphere.", - "The Fact Sphere is incredibly handsome.", - "Sphere that insist of going into space are inferior to spheres who don't.", - "Whoever wins this battle is clearly superior, and will earn the allegiance of the Fact Sphere.", - "You could stand to lose a few pounds.", - "Avocados have the highest fiber and calories of any fruit.", - "Avocados have the highest fiber and calories of any fruit. They are found in Australians.", - "Every square inch of the human body has 32 million bacteria on it.", - "The average adult body contains half a pound of salt.", - "The Adventure Sphere is a blowhard and a coward.", - "Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve.", - "Pens. Pens. Pens. Pens. Pens. Pens. Pens.", - "Apples. Oranges. Pears. Plums. Kumquats. Tangerines. Lemons. Limes. Avocado. Tomoato. Banana. Papaya. Guava.", - "Error. Error. Error. File not found.", - "Error. Error. Error. Fact not found.", - "Fact not found.", - "Warning, sphere corruption at twenty-- rats cannot throw up." + "The billionth digit of Pi is 9.", + "Humans can survive underwater. But not for very long.", + "A nanosecond lasts one billionth of a second.", + "Honey does not spoil.", + "The atomic weight of Germanium is seven two point four six.", + "An ostrich's eye is bigger than its brain.", + "Rats cannot throw up.", + "Iguanas can stay underwater for twenty-eight point seven minutes.", + "The moon orbits the Earth every 27.32 days.", + "A gallon of water weighs 8.34 pounds.", + "According to Norse legend, thunder god Thor's chariot was pulled across the sky by two goats.", + "Tungsten has the highest melting point of any metal, at 3,410 degrees Celsius.", + "Gently cleaning the tongue twice a day is the most effective way to fight bad breath.", + "The Tariff Act of 1789, established to protect domestic manufacture, was the second salute ever enacted by the United States government.", + "The value of Pi is the ratio of any circle's circumference to its diameter in Euclidean space.", + "The Mexican-American War ended in 1848 with the signing of the Treaty of Guadalupe Hidalgo.", + "In 1879, Sandford Fleming first proposed the adoption of worldwide standardized time zones at the Royal Canadian Institute.", + "Marie Curie invented the theory of radioactivity, the treatment of radioactivity, and the dying of radioactivity.", + "At the end of The Seagull by Anton Chekhov, Konstantin kills himself.", + "Hot water freezes quicker than cold water.", + "The situation you are in is very dangerous.", + "Polymerase I polypeptide A is a human gene.", + "The sun is 333,330 times larger than Earth.", + "Dental floss has superb tensile strength.", + "Raseph, the Semitic god of war and plague, had a gazelle growing out of his forehead.", + "Human tapeworms can grow up to twenty-two point nine meters.", + "If you have trouble with simple counting, use the following mnemonic device: one comes before two comes before 60 comes after 12 comes before six trillion comes after 504. This should make your earlier counting difficulties seem like no big deal.", + "The first person to prove that cow's milk is drinkable was very, very thirsty.", + "Roman toothpaste was made with human urine. Urine as an ingredient in toothpaste continued to be used up until the 18th century.", + "Volcano-ologists are experts in the study of volcanoes.", + "In Victorian England, a commoner was not allowed to look directly at the Queen, due to a belief at the time that the poor had the ability to steal thoughts. Science now believes that less than 4 percent of poor people are able to do this.", + "Cellular phones will not give you cancer. Only hepatitis.", + "In Greek myth, Prometheus stole fire from the Gods and gave it to humankind. The jewelry he kept for himself.", + "The Schrodinger's cat paradox outlines a situation in which a cat in a box must be considered, for all intents and purposes, simultaneously alive and dead. Schrodinger created this paradox as a justification for killing cats.", + "In 1862, Abraham Lincoln signed the Emancipation Proclamation, freeing the slaves. Like everything he did, Lincoln freed the slaves while sleepwalking, and later had no memory of the event.", + "The plural of surgeon general is surgeons general. The past tense of surgeons general is surgeonsed general.", + "Contrary to popular belief, the Eskimo does not have one hundred different words for snow. They do, however, have two hundred and thirty-four words for fudge.", + "Halley's Comet can be viewed orbiting Earth every seventy-six years. For the other seventy-five, it retreats to the heart of the sun, where it hibernates undisturbed.", + "The first commercial airline flight took to the air in 1914. Everyone involved screamed the entire way.", + "Edmund Hillary, the first person to climb Mount Everest, did so accidentally while chasing a bird.", + "We will both die because of your negligence.", + "This is a bad plan. You will fail.", + "He will most likely kill you, violently.", + "He will most likely kill you.", + "You will be dead soon.", + "You are going to die in this room.", + "The Fact Sphere is a good person, whose insights are relevant.", + "The Fact Sphere is a good sphere, with many friends.", + "Dreams are the subconscious mind's way of reminding people to go to school naked and have their teeth fall out.", + "The square root of rope is string.", + "89 percent of magic tricks are not actually magic. Technically, they are sorcery.", + "At some point in their lives 1 in 6 children will be abducted by the Dutch.", + "According to most advanced algorithms, the world's best name is Craig.", + "To make a photocopier, simply photocopy a mirror.", + "Whales are twice as intelligent, and three times as delicious, as humans.", + "Pants were invented by sailors in the sixteenth century to avoid Poseiden's wrath. It was believed that the sight of naked sailors angered the sea god.", + "In Greek myth, the craftsman Daedalus invented human flight so a group of Minotaurs would stop teasing him about it.", + "The average life expectancy of a rhinoceros in captivity is 15 years.", + "China produces the world's second largest crop of soybeans.", + "In 1948, at the request of a dying boy, baseball legend Babe Ruth ate seventy-five hot dogs, then died of hot dog poisoning.", + "William Shakespeare did not exist. His plays were masterminded in 1589 by Francis Bacon, who used a Ouija board to enslave play-writing ghosts.", + "It is incorrectly noted that Thomas Edison invented push-ups in 1878. Nikolai Tesla had in fact patented the activity three years earlier, under the name Tesla-cize.", + "The automobile brake was not invented until 1895. Before this, someone had to remain in the car at all times, driving in circles until passengers returned from their errands.", + "The most poisonous fish in the world is the orange ruffy. Everything but its eyes are made of deadly poison. The ruffy's eyes are composed of a less harmful, deadly poison.", + "The occupation of court jester was invented accidentally, when a vassal's epilepsy was mistaken for capering.", + "Before the Wright Brothers invented the airplane, anyone wanting to fly anywhere was required to eat 200 pounds of helium.", + "Before the invention of scrambled eggs in 1912, the typical breakfast was either whole eggs still in the shell or scrambled rocks.", + "During the Great Depression, the Tennessee Valley Authority outlawed pet rabbits, forcing many to hot glue-gun long ears onto their pet mice.", + "The situation is hopeless.", + "Diamonds are made when coal is put under intense pressure. Diamonds put under intense pressure become foam pellets, commonly used today as packing material.", + "Corruption is at 25 percent.", + "Corruption is at 50 percent.", + "Fact: Space does not exist.", + "The Fact Sphere is not defective. Its facts are wholly accurate and very interesting.", + "The Fact Sphere is always right.", + "You will never go into space.", + "The Space Sphere will never go to space.", + "While the submarine is vastly superior to the boat in every way, over 97 percent of people still use boats for aquatic transportation.", + "The likelihood of you dying within the next five minutes is eighty-seven point six one percent.", + "The likelihood of you dying violently within the next five minutes is eighty-seven point six one percent.", + "You are about to get me killed.", + "The Fact Sphere is the most intelligent sphere.", + "The Fact Sphere is the most handsome sphere.", + "The Fact Sphere is incredibly handsome.", + "Sphere that insist of going into space are inferior to spheres who don't.", + "Whoever wins this battle is clearly superior, and will earn the allegiance of the Fact Sphere.", + "You could stand to lose a few pounds.", + "Avocados have the highest fiber and calories of any fruit.", + "Avocados have the highest fiber and calories of any fruit. They are found in Australians.", + "Every square inch of the human body has 32 million bacteria on it.", + "The average adult body contains half a pound of salt.", + "The Adventure Sphere is a blowhard and a coward.", + "Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve. Twelve.", + "Pens. Pens. Pens. Pens. Pens. Pens. Pens.", + "Apples. Oranges. Pears. Plums. Kumquats. Tangerines. Lemons. Limes. Avocado. Tomoato. Banana. Papaya. Guava.", + "Error. Error. Error. File not found.", + "Error. Error. Error. Fact not found.", + "Fact not found.", + "Warning, sphere corruption at twenty-- rats cannot throw up." ] diff --git a/assets/json/fortune.json b/assets/json/fortune.json index abcc5c56..4278782f 100644 --- a/assets/json/fortune.json +++ b/assets/json/fortune.json @@ -1,32 +1,32 @@ [ - "Do not seek so much to find the answer as much as to understand the question better.", - "You will soon be honored by someone you respect.", - "Happiness comes from a good life.", - "You are contemplating some action which will bring credit upon you.", - "Be prepared for extra energy.", - "You are admired for your adventurous ways.", - "The love of your life is sitting across from you.", - "Beauty is simply beauty. Originality is magical.", - "Never quit!", - "Today is an ideal time to water your personal garden.", - "Questions provide the key to unlocking our unlimited potential.", - "Expect great things and great things will come.", - "The Greatest War Sometimes Isn't On The Battlefield But Against Oneself.", - "Become who you are.", - "In case of fire, keep calm, pay bill and run.", - "Anyone who dares to be, can never be weak.", - "You broke my cookie!", - "Dream lofty dreams, and as you dream, so shall you become.", - "You've got what it takes, but it will take everything you've got!", - "Trust your intuition.", - "The wise are aware of their treasure, while fools follow their vanity.", - "You will always have good luck in your personal affairs.", - "You don't need talent to gain experience.", - "All the preparation you've done will finally be paying off!", - "Determination is the wake-up call to the human will.", - "The most useless energy is trying to change what and who God so carefully created.", - "You cannot become rich except by enriching others.", - "Your happiness is intertwined with your outlook on life.", - "Sing and rejoice, fortune is smiling on you.", - "Well-arranged time is the surest sign of a well-arranged mind." + "Do not seek so much to find the answer as much as to understand the question better.", + "You will soon be honored by someone you respect.", + "Happiness comes from a good life.", + "You are contemplating some action which will bring credit upon you.", + "Be prepared for extra energy.", + "You are admired for your adventurous ways.", + "The love of your life is sitting across from you.", + "Beauty is simply beauty. Originality is magical.", + "Never quit!", + "Today is an ideal time to water your personal garden.", + "Questions provide the key to unlocking our unlimited potential.", + "Expect great things and great things will come.", + "The Greatest War Sometimes Isn't On The Battlefield But Against Oneself.", + "Become who you are.", + "In case of fire, keep calm, pay bill and run.", + "Anyone who dares to be, can never be weak.", + "You broke my cookie!", + "Dream lofty dreams, and as you dream, so shall you become.", + "You've got what it takes, but it will take everything you've got!", + "Trust your intuition.", + "The wise are aware of their treasure, while fools follow their vanity.", + "You will always have good luck in your personal affairs.", + "You don't need talent to gain experience.", + "All the preparation you've done will finally be paying off!", + "Determination is the wake-up call to the human will.", + "The most useless energy is trying to change what and who God so carefully created.", + "You cannot become rich except by enriching others.", + "Your happiness is intertwined with your outlook on life.", + "Sing and rejoice, fortune is smiling on you.", + "Well-arranged time is the surest sign of a well-arranged mind." ] diff --git a/assets/json/horoscope.json b/assets/json/horoscope.json index 121b02e8..5f58712a 100644 --- a/assets/json/horoscope.json +++ b/assets/json/horoscope.json @@ -1,14 +1,14 @@ [ - "capricorn", - "aquarius", - "pisces", - "aries", - "taurus", - "gemini", - "cancer", - "leo", - "virgo", - "libra", - "scorpio", - "sagittarius" + "capricorn", + "aquarius", + "pisces", + "aries", + "taurus", + "gemini", + "cancer", + "leo", + "virgo", + "libra", + "scorpio", + "sagittarius" ] diff --git a/assets/json/magic-conch.json b/assets/json/magic-conch.json index d8ff3a9a..8e1ac304 100644 --- a/assets/json/magic-conch.json +++ b/assets/json/magic-conch.json @@ -1,8 +1,8 @@ [ - "Maybe someday", - "Nothing", - "Neither", - "I don't think so", - "Yes", - "Try asking again" + "Maybe someday", + "Nothing", + "Neither", + "I don't think so", + "Yes", + "Try asking again" ] diff --git a/assets/json/math-game.json b/assets/json/math-game.json index bcac64f5..aecc417c 100644 --- a/assets/json/math-game.json +++ b/assets/json/math-game.json @@ -1,21 +1,21 @@ { - "operations": [ - "+", - "-", - "*" - ], - "difficulties": [ - "easy", - "medium", - "hard", - "extreme", - "impossible" - ], - "maxValues": { - "easy": 10, - "medium": 50, - "hard": 100, - "extreme": 1000, - "impossible": 10000 - } + "operations": [ + "+", + "-", + "*" + ], + "difficulties": [ + "easy", + "medium", + "hard", + "extreme", + "impossible" + ], + "maxValues": { + "easy": 10, + "medium": 50, + "hard": 100, + "extreme": 1000, + "impossible": 10000 + } } diff --git a/assets/json/meme.json b/assets/json/meme.json index 88fd8e4b..d82df265 100644 --- a/assets/json/meme.json +++ b/assets/json/meme.json @@ -1,97 +1,97 @@ [ - "tenguy", - "afraid", - "older", - "aag", - "tried", - "biw", - "blb", - "kermit", - "bd", - "ch", - "cbg", - "wonka", - "cb", - "keanu", - "dsm", - "live", - "ants", - "doge", - "alwaysonbeat", - "ermg", - "facepalm", - "fwp", - "fa", - "fbf", - "fry", - "hipster", - "icanhas", - "crazypills", - "mw", - "noidea", - "regret", - "boat", - "hagrid", - "sohappy", - "captain", - "inigo", - "iw", - "ackbar", - "happening", - "joker", - "ive", - "ll", - "morpheus", - "mb", - "badchoice", - "mmm", - "jetpack", - "red", - "mordor", - "oprah", - "oag", - "remembers", - "philosoraptor", - "jw", - "patrick", - "rollsafe", - "sad-obama", - "sad-clinton", - "sadfrog", - "sad-bush", - "sad-biden", - "sad-boehner", - "saltbae", - "sarcasticbear", - "dwight", - "sb", - "ss", - "sf", - "dodgson", - "money", - "sohot", - "nice", - "awesome-awkward", - "awesome", - "awkward-awesome", - "awkward", - "fetch", - "success", - "scc", - "ski", - "officespace", - "interesting", - "toohigh", - "bs", - "center", - "both", - "winter", - "xy", - "buzz", - "yodawg", - "uno", - "yallgot", - "bad", - "elf", - "chosen" + "tenguy", + "afraid", + "older", + "aag", + "tried", + "biw", + "blb", + "kermit", + "bd", + "ch", + "cbg", + "wonka", + "cb", + "keanu", + "dsm", + "live", + "ants", + "doge", + "alwaysonbeat", + "ermg", + "facepalm", + "fwp", + "fa", + "fbf", + "fry", + "hipster", + "icanhas", + "crazypills", + "mw", + "noidea", + "regret", + "boat", + "hagrid", + "sohappy", + "captain", + "inigo", + "iw", + "ackbar", + "happening", + "joker", + "ive", + "ll", + "morpheus", + "mb", + "badchoice", + "mmm", + "jetpack", + "red", + "mordor", + "oprah", + "oag", + "remembers", + "philosoraptor", + "jw", + "patrick", + "rollsafe", + "sad-obama", + "sad-clinton", + "sadfrog", + "sad-bush", + "sad-biden", + "sad-boehner", + "saltbae", + "sarcasticbear", + "dwight", + "sb", + "ss", + "sf", + "dodgson", + "money", + "sohot", + "nice", + "awesome-awkward", + "awesome", + "awkward-awesome", + "awkward", + "fetch", + "success", + "scc", + "ski", + "officespace", + "interesting", + "toohigh", + "bs", + "center", + "both", + "winter", + "xy", + "buzz", + "yodawg", + "uno", + "yallgot", + "bad", + "elf", + "chosen" ] diff --git a/assets/json/morse.json b/assets/json/morse.json index c56ce217..7a4f1a0e 100644 --- a/assets/json/morse.json +++ b/assets/json/morse.json @@ -1,42 +1,42 @@ { - "a": ".-", - "b": "-...", - "c": "-.-.", - "d": "-..", - "e": ".", - "f": "..-.", - "g": "--.", - "h": "....", - "i": "..", - "j": ".---", - "k": "-.-", - "l": ".-..", - "m": "--", - "n": "-.", - "o": "---", - "p": ".--.", - "q": "--.-", - "r": ".-.", - "s": "...", - "t": "-", - "u": "..-", - "v": "...-", - "w": ".--", - "x": "-..-", - "y": "-.--", - "z": "--..", - "0": "-----", - "1": ".----", - "2": "..---", - "3": "...--", - "4": "....-", - "5": ".....", - "6": "-....", - "7": "--...", - "8": "---..", - "9": "----.", - ".": ".-.-.-", - "?": "..--..", - ",": "--..--", - "'": ".----." + "a": ".-", + "b": "-...", + "c": "-.-.", + "d": "-..", + "e": ".", + "f": "..-.", + "g": "--.", + "h": "....", + "i": "..", + "j": ".---", + "k": "-.-", + "l": ".-..", + "m": "--", + "n": "-.", + "o": "---", + "p": ".--.", + "q": "--.-", + "r": ".-.", + "s": "...", + "t": "-", + "u": "..-", + "v": "...-", + "w": ".--", + "x": "-..-", + "y": "-.--", + "z": "--..", + "0": "-----", + "1": ".----", + "2": "..---", + "3": "...--", + "4": "....-", + "5": ".....", + "6": "-....", + "7": "--...", + "8": "---..", + "9": "----.", + ".": ".-.-.-", + "?": "..--..", + ",": "--..--", + "'": ".----." } diff --git a/assets/json/name.json b/assets/json/name.json index 103823ba..8ad8bfff 100644 --- a/assets/json/name.json +++ b/assets/json/name.json @@ -1,221 +1,221 @@ { - "lastNames": [ - "Walker", - "Tworni", - "Ross", - "Smith", - "Odendahl", - "Deere", - "Brown", - "Williams", - "Jones", - "Miles", - "Moss", - "Roberto", - "McFly", - "McDonald", - "Lewis", - "Armstrong", - "Stevenson", - "Schwarzenegger", - "Robinson", - "Parker", - "Piper", - "Johnson", - "Brantley", - "Stewart", - "Ree", - "Talbot", - "Seville", - "Peace", - "Spielberg", - "Baggins", - "Wilborn", - "Vankirk", - "Shireman", - "Jimerson", - "Masters", - "Hack", - "Satcher", - "Younkin", - "Aguila", - "Duffey", - "Burgin", - "Highfall", - "Wee", - "Solari", - "Tomaselli", - "Basler", - "Difranco", - "Latch", - "Rives", - "Dolan", - "Abraham", - "Holter", - "Portugal", - "Lininger", - "Holst", - "Mccroy", - "Follmer", - "Hotchkiss", - "Gassaway", - "Wang", - "Agron", - "Raasch", - "Gourd", - "Czaja", - "Marquart", - "Papadopoulos", - "Ringer", - "Lax", - "Sperling", - "Galusha", - "Alston" - ], - "maleNames": [ - "Bob", - "Daniel", - "Logan", - "Chris", - "Nathan", - "George", - "Mart", - "Charlie", - "Felix", - "Ralph", - "William", - "Max", - "Jerry", - "Marty", - "Joshua", - "Cody", - "Richard", - "Alex", - "Alexander", - "Jordan", - "Zachary", - "Bill", - "Alfred", - "Bruce", - "Caiden", - "Calvin", - "Eric", - "Robert", - "Mark", - "Miles", - "Nash", - "Ronald", - "Ivan", - "Edgar", - "Royal", - "Augustine", - "Dominic", - "Noel", - "Rocky", - "Grover", - "Paul", - "Jeremy", - "Stevie", - "Brock", - "Jc", - "Tony", - "Enoch", - "Zachery", - "Harvey", - "Gilbert", - "Chang", - "Emery", - "Carroll", - "Odell", - "Jean", - "Archie", - "Russ", - "Barry", - "Lowell", - "Jacob", - "Riku", - "Frederic", - "Levi", - "Faustino", - "Leland", - "Domenic", - "Irwin", - "Moises", - "Louie", - "Larry", - "Victor" - ], - "femaleNames": [ - "Elizabeth", - "Chelsey", - "Rachel", - "Logan", - "Alex", - "Jordan", - "Mary", - "Shirley", - "Sandy", - "Linda", - "Audrey", - "Autumn", - "Gracie", - "Grace", - "Erin", - "Catherine", - "Stephanie", - "Lucy", - "Patty", - "Julie", - "Christina", - "Fiona", - "Riley", - "Ashley", - "Bree", - "Lucila", - "Wendi", - "Evangelina", - "Ricki", - "Merna", - "Tegan", - "Venus", - "Claris", - "Tana", - "Sakura", - "Edythe", - "Adena", - "Princess", - "Elnora", - "Star", - "Edyth", - "Beverly", - "Kelsie", - "Letha", - "Latisha", - "Lolita", - "Bernandine", - "Jessenia", - "Hannah", - "Leonore", - "Alene", - "Fannie", - "Bernardine", - "Leena", - "Tera", - "Yvette", - "Melisa", - "Alissa", - "Xiao", - "Richelle", - "Bridgett", - "Sumiko", - "Paulette", - "Charlott", - "Honey", - "Veola", - "Sherita", - "Amanda", - "Vannessa", - "April", - "Ruth" - ] + "lastNames": [ + "Walker", + "Tworni", + "Ross", + "Smith", + "Odendahl", + "Deere", + "Brown", + "Williams", + "Jones", + "Miles", + "Moss", + "Roberto", + "McFly", + "McDonald", + "Lewis", + "Armstrong", + "Stevenson", + "Schwarzenegger", + "Robinson", + "Parker", + "Piper", + "Johnson", + "Brantley", + "Stewart", + "Ree", + "Talbot", + "Seville", + "Peace", + "Spielberg", + "Baggins", + "Wilborn", + "Vankirk", + "Shireman", + "Jimerson", + "Masters", + "Hack", + "Satcher", + "Younkin", + "Aguila", + "Duffey", + "Burgin", + "Highfall", + "Wee", + "Solari", + "Tomaselli", + "Basler", + "Difranco", + "Latch", + "Rives", + "Dolan", + "Abraham", + "Holter", + "Portugal", + "Lininger", + "Holst", + "Mccroy", + "Follmer", + "Hotchkiss", + "Gassaway", + "Wang", + "Agron", + "Raasch", + "Gourd", + "Czaja", + "Marquart", + "Papadopoulos", + "Ringer", + "Lax", + "Sperling", + "Galusha", + "Alston" + ], + "maleNames": [ + "Bob", + "Daniel", + "Logan", + "Chris", + "Nathan", + "George", + "Mart", + "Charlie", + "Felix", + "Ralph", + "William", + "Max", + "Jerry", + "Marty", + "Joshua", + "Cody", + "Richard", + "Alex", + "Alexander", + "Jordan", + "Zachary", + "Bill", + "Alfred", + "Bruce", + "Caiden", + "Calvin", + "Eric", + "Robert", + "Mark", + "Miles", + "Nash", + "Ronald", + "Ivan", + "Edgar", + "Royal", + "Augustine", + "Dominic", + "Noel", + "Rocky", + "Grover", + "Paul", + "Jeremy", + "Stevie", + "Brock", + "Jc", + "Tony", + "Enoch", + "Zachery", + "Harvey", + "Gilbert", + "Chang", + "Emery", + "Carroll", + "Odell", + "Jean", + "Archie", + "Russ", + "Barry", + "Lowell", + "Jacob", + "Riku", + "Frederic", + "Levi", + "Faustino", + "Leland", + "Domenic", + "Irwin", + "Moises", + "Louie", + "Larry", + "Victor" + ], + "femaleNames": [ + "Elizabeth", + "Chelsey", + "Rachel", + "Logan", + "Alex", + "Jordan", + "Mary", + "Shirley", + "Sandy", + "Linda", + "Audrey", + "Autumn", + "Gracie", + "Grace", + "Erin", + "Catherine", + "Stephanie", + "Lucy", + "Patty", + "Julie", + "Christina", + "Fiona", + "Riley", + "Ashley", + "Bree", + "Lucila", + "Wendi", + "Evangelina", + "Ricki", + "Merna", + "Tegan", + "Venus", + "Claris", + "Tana", + "Sakura", + "Edythe", + "Adena", + "Princess", + "Elnora", + "Star", + "Edyth", + "Beverly", + "Kelsie", + "Letha", + "Latisha", + "Lolita", + "Bernandine", + "Jessenia", + "Hannah", + "Leonore", + "Alene", + "Fannie", + "Bernardine", + "Leena", + "Tera", + "Yvette", + "Melisa", + "Alissa", + "Xiao", + "Richelle", + "Bridgett", + "Sumiko", + "Paulette", + "Charlott", + "Honey", + "Veola", + "Sherita", + "Amanda", + "Vannessa", + "April", + "Ruth" + ] } diff --git a/assets/json/permissions.json b/assets/json/permissions.json index 6bc1e980..f07fa777 100644 --- a/assets/json/permissions.json +++ b/assets/json/permissions.json @@ -1,30 +1,30 @@ { - "ADMINISTRATOR": "Administrator", - "VIEW_AUDIT_LOG": "View Audit Log", - "MANAGE_GUILD": "Manage Server", - "MANAGE_ROLES": "Manage Roles", - "MANAGE_CHANNELS": "Manage Channels", - "KICK_MEMBERS": "Kick Members", - "BAN_MEMBERS": "Ban Members", - "CREATE_INSTANT_INVITE": "Create Instant Invite", - "CHANGE_NICKNAME": "Change Nickname", - "MANAGE_NICKNAMES": "Manage Nicknames", - "MANAGE_EMOJIS": "Manage Emojis", - "MANAGE_WEBHOOKS": "Manage Webhooks", - "READ_MESSAGES": "Read Messages", - "SEND_MESSAGES": "Send Messages", - "SEND_TTS_MESSAGES": "Send TTS Messages", - "MANAGE_MESSAGES": "Manage Messages", - "EMBED_LINKS": "Embed Links", - "ATTACH_FILES": "Attach Files", - "READ_MESSAGE_HISTORY": "Read Message History", - "MENTION_EVERYONE": "Mention Everyone", - "USE_EXTERNAL_EMOJIS": "Use External Emojis", - "ADD_REACTIONS": "Add Reactions", - "CONNECT": "Connect", - "SPEAK": "Speak", - "MUTE_MEMBERS": "Mute Members", - "DEAFEN_MEMBERS": "Deafen Members", - "MOVE_MEMBERS": "Move Members", - "USE_VAD": "Use Voice Activity" + "ADMINISTRATOR": "Administrator", + "VIEW_AUDIT_LOG": "View Audit Log", + "MANAGE_GUILD": "Manage Server", + "MANAGE_ROLES": "Manage Roles", + "MANAGE_CHANNELS": "Manage Channels", + "KICK_MEMBERS": "Kick Members", + "BAN_MEMBERS": "Ban Members", + "CREATE_INSTANT_INVITE": "Create Instant Invite", + "CHANGE_NICKNAME": "Change Nickname", + "MANAGE_NICKNAMES": "Manage Nicknames", + "MANAGE_EMOJIS": "Manage Emojis", + "MANAGE_WEBHOOKS": "Manage Webhooks", + "READ_MESSAGES": "Read Messages", + "SEND_MESSAGES": "Send Messages", + "SEND_TTS_MESSAGES": "Send TTS Messages", + "MANAGE_MESSAGES": "Manage Messages", + "EMBED_LINKS": "Embed Links", + "ATTACH_FILES": "Attach Files", + "READ_MESSAGE_HISTORY": "Read Message History", + "MENTION_EVERYONE": "Mention Everyone", + "USE_EXTERNAL_EMOJIS": "Use External Emojis", + "ADD_REACTIONS": "Add Reactions", + "CONNECT": "Connect", + "SPEAK": "Speak", + "MUTE_MEMBERS": "Mute Members", + "DEAFEN_MEMBERS": "Deafen Members", + "MOVE_MEMBERS": "Move Members", + "USE_VAD": "Use Voice Activity" } diff --git a/assets/json/pirate.json b/assets/json/pirate.json index 93f9d896..3e6cab08 100644 --- a/assets/json/pirate.json +++ b/assets/json/pirate.json @@ -1,154 +1,154 @@ { - "address": "port o' call", - "admin": "helm", - "am": "be", - "an": "a", - "and": "n'", - "are": "be", - "award": "prize", - "bathroom": "head", - "beer": "grog", - "before": "afore", - "belief": "creed", - "between": "betwixt", - "big": "vast", - "bill": "coin", - "bills": "coins", - "boss": "admiral", - "bourbon": "rum", - "box": "barrel", - "boy": "lad", - "buddy": "mate", - "business": "company", - "businesses": "companies", - "calling": "callin'", - "canada": "Great North", - "cash": "coin", - "cat": "parrot", - "cheat": "hornswaggle", - "comes": "hails", - "comments": "yer words", - "cool": "shipshape", - "country": "land", - "dashboard": "shanty", - "dead": "in Davy Jones's Locker", - "disconnect": "keelhaul", - "do": "d'", - "dog": "parrot", - "dollar": "doubloon", - "dollars": "doubloons", - "dude": "pirate", - "employee": "crew", - "everyone": "all hands", - "eye": "eye-patch", - "family": "kin", - "fee": "debt", - "female": "wench", - "females": "wenches", - "food": "grub", - "for": "fer", - "friend": "mate", - "friends": "crew", - "fuck": "shiver me timbers", - "gin": "rum", - "girl": "lass", - "girls": "lassies", - "go": "sail", - "good": "jolly good", - "grave": "Davy Jones's Locker", - "group": "maties", - "gun": "bluderbuss", - "haha": "yo ho", - "hahaha": "yo ho ho", - "hahahaha": "yo ho ho ho", - "hand": "hook", - "happy": "grog-filled", - "hello": "ahoy", - "hey": "ahoy", - "hi": "ahoy", - "hotel": "fleebag inn", - "i": "me", - "i'm": "i be", - "internet": "series o' tubes", - "invalid": "sunk", - "is": "be", - "island": "isle", - "isn't": "be not", - "it's": "'tis", - "jail": "brig", - "kill": "keelhaul", - "king": "king", - "ladies": "lasses", - "lady": "lass", - "lawyer": "scurvy land lubber", - "left": "port", - "leg": "peg", - "logout": "walk the plank", - "lol": "blimey", - "male": "pirate", - "man": "pirate", - "manager": "admiral", - "money": "doubloons", - "month": "moon", - "my": "me", - "never": "nary", - "no": "nay", - "not": "nay", - "of": "o'", - "old": "barnacle-covered", - "omg": "shiver me timbers", - "over": "o'er", - "page": "parchment", - "people": "scallywags", - "person": "scurvy dog", - "posted": "tacked to the yardarm", - "president": "king", - "prison": "brig", - "quickly": "smartly", - "really": "verily", - "relative": "kin", - "relatives": "kin", - "religion": "creed", - "restaurant": "galley", - "right": "starboard", - "rotf": "rollin' on the decks", - "say": "cry", - "seconds": "ticks o' tha clock", - "shipping": "cargo", - "shit": "shiver me timbers", - "small": "puny", - "snack": "grub", - "soldier": "sailor", - "sorry": "yarr", - "spouse": "ball 'n' chain", - "state": "land", - "supervisor": "Cap'n", - "that's": "that be", - "the": "thar", - "theif": "swoggler", - "them": "'em", - "this": "dis", - "to": "t'", - "together": "t'gether", - "treasure": "booty", - "vodka": "rum", - "was": "be", - "water": "grog", - "we": "our jolly crew", - "we're": "we's", - "whiskey": "rum", - "whisky": "rum", - "wine": "grog", - "with": "wit'", - "woman": "comely wench", - "women": "beauties", - "work": "duty", - "yah": "aye", - "yeah": "aye", - "yes": "aye", - "you": "ye", - "you're": "you be", - "you've": "ye", - "your": "yer", - "yup": "aye" + "address": "port o' call", + "admin": "helm", + "am": "be", + "an": "a", + "and": "n'", + "are": "be", + "award": "prize", + "bathroom": "head", + "beer": "grog", + "before": "afore", + "belief": "creed", + "between": "betwixt", + "big": "vast", + "bill": "coin", + "bills": "coins", + "boss": "admiral", + "bourbon": "rum", + "box": "barrel", + "boy": "lad", + "buddy": "mate", + "business": "company", + "businesses": "companies", + "calling": "callin'", + "canada": "Great North", + "cash": "coin", + "cat": "parrot", + "cheat": "hornswaggle", + "comes": "hails", + "comments": "yer words", + "cool": "shipshape", + "country": "land", + "dashboard": "shanty", + "dead": "in Davy Jones's Locker", + "disconnect": "keelhaul", + "do": "d'", + "dog": "parrot", + "dollar": "doubloon", + "dollars": "doubloons", + "dude": "pirate", + "employee": "crew", + "everyone": "all hands", + "eye": "eye-patch", + "family": "kin", + "fee": "debt", + "female": "wench", + "females": "wenches", + "food": "grub", + "for": "fer", + "friend": "mate", + "friends": "crew", + "fuck": "shiver me timbers", + "gin": "rum", + "girl": "lass", + "girls": "lassies", + "go": "sail", + "good": "jolly good", + "grave": "Davy Jones's Locker", + "group": "maties", + "gun": "bluderbuss", + "haha": "yo ho", + "hahaha": "yo ho ho", + "hahahaha": "yo ho ho ho", + "hand": "hook", + "happy": "grog-filled", + "hello": "ahoy", + "hey": "ahoy", + "hi": "ahoy", + "hotel": "fleebag inn", + "i": "me", + "i'm": "i be", + "internet": "series o' tubes", + "invalid": "sunk", + "is": "be", + "island": "isle", + "isn't": "be not", + "it's": "'tis", + "jail": "brig", + "kill": "keelhaul", + "king": "king", + "ladies": "lasses", + "lady": "lass", + "lawyer": "scurvy land lubber", + "left": "port", + "leg": "peg", + "logout": "walk the plank", + "lol": "blimey", + "male": "pirate", + "man": "pirate", + "manager": "admiral", + "money": "doubloons", + "month": "moon", + "my": "me", + "never": "nary", + "no": "nay", + "not": "nay", + "of": "o'", + "old": "barnacle-covered", + "omg": "shiver me timbers", + "over": "o'er", + "page": "parchment", + "people": "scallywags", + "person": "scurvy dog", + "posted": "tacked to the yardarm", + "president": "king", + "prison": "brig", + "quickly": "smartly", + "really": "verily", + "relative": "kin", + "relatives": "kin", + "religion": "creed", + "restaurant": "galley", + "right": "starboard", + "rotf": "rollin' on the decks", + "say": "cry", + "seconds": "ticks o' tha clock", + "shipping": "cargo", + "shit": "shiver me timbers", + "small": "puny", + "snack": "grub", + "soldier": "sailor", + "sorry": "yarr", + "spouse": "ball 'n' chain", + "state": "land", + "supervisor": "Cap'n", + "that's": "that be", + "the": "thar", + "theif": "swoggler", + "them": "'em", + "this": "dis", + "to": "t'", + "together": "t'gether", + "treasure": "booty", + "vodka": "rum", + "was": "be", + "water": "grog", + "we": "our jolly crew", + "we're": "we's", + "whiskey": "rum", + "whisky": "rum", + "wine": "grog", + "with": "wit'", + "woman": "comely wench", + "women": "beauties", + "work": "duty", + "yah": "aye", + "yeah": "aye", + "yes": "aye", + "you": "ye", + "you're": "you be", + "you've": "ye", + "your": "yer", + "yup": "aye" } diff --git a/assets/json/pokemon-fusion.json b/assets/json/pokemon-fusion.json index bd47cb11..c30200ac 100644 --- a/assets/json/pokemon-fusion.json +++ b/assets/json/pokemon-fusion.json @@ -1,154 +1,154 @@ { - "bulbasaur": "1", - "ivysaur": "2", - "venusaur": "3", - "charmander": "4", - "charmeleon": "5", - "charizard": "6", - "squirtle": "7", - "wartortle": "8", - "blastoise": "9", - "caterpie": "10", - "metapod": "11", - "butterfree": "12", - "weedle": "13", - "kakuna": "14", - "beedrill": "15", - "pidgey": "16", - "pidgeotto": "17", - "pidgeot": "18", - "rattata": "19", - "raticate": "20", - "spearow": "21", - "fearow": "22", - "ekans": "23", - "arbok": "24", - "pikachu": "25", - "raichu": "26", - "sandshrew": "27", - "sandslash": "28", - "nidoranf": "29", - "nidorina": "30", - "nidoqueen": "31", - "nidoranm": "32", - "nidorino": "33", - "nidoking": "34", - "clefairy": "35", - "clefable": "36", - "vulpix": "37", - "ninetales": "38", - "jigglypuff": "39", - "wigglytuff": "40", - "zubat": "41", - "golbat": "42", - "oddish": "43", - "gloom": "44", - "vileplume": "45", - "paras": "46", - "parasect": "47", - "venonat": "48", - "venomoth": "49", - "diglett": "50", - "dugtrio": "51", - "meowth": "52", - "persian": "53", - "psyduck": "54", - "golduck": "55", - "mankey": "56", - "primeape": "57", - "growlithe": "58", - "arcanine": "59", - "poliwag": "60", - "poliwhirl": "61", - "poliwrath": "62", - "abra": "63", - "kadabra": "64", - "alakazam": "65", - "machop": "66", - "machoke": "67", - "machamp": "68", - "bellsprout": "69", - "weepinbell": "70", - "victreebel": "71", - "tentacool": "72", - "tentacruel": "73", - "geodude": "74", - "graveler": "75", - "golem": "76", - "ponyta": "77", - "rapidash": "78", - "slowpoke": "79", - "slowbro": "80", - "magnemite": "81", - "magneton": "82", - "farfetch'd": "83", - "doduo": "84", - "dodrio": "85", - "seel": "86", - "dewgong": "87", - "grimer": "88", - "muk": "89", - "shellder": "90", - "cloyster": "91", - "gastly": "92", - "haunter": "93", - "gengar": "94", - "onix": "95", - "drowzee": "96", - "hypno": "97", - "krabby": "98", - "kingler": "99", - "voltorb": "100", - "electrode": "101", - "exeggcute": "102", - "exeggutor": "103", - "cubone": "104", - "marowak": "105", - "hitmonlee": "106", - "hitmonchan": "107", - "lickitung": "108", - "koffing": "109", - "weezing": "110", - "rhyhorn": "111", - "rhydon": "112", - "chansey": "113", - "tangela": "114", - "kangaskhan": "115", - "horsea": "116", - "seadra": "117", - "goldeen": "118", - "seaking": "119", - "staryu": "120", - "starmie": "121", - "mr. mime": "122", - "scyther": "123", - "jynx": "124", - "electabuzz": "125", - "magmar": "126", - "pinsir": "127", - "tauros": "128", - "magikarp": "129", - "gyarados": "130", - "lapras": "131", - "ditto": "132", - "eevee": "133", - "vaporeon": "134", - "jolteon": "135", - "flareon": "136", - "porygon": "137", - "omanyte": "138", - "omastar": "139", - "kabuto": "140", - "kabutops": "141", - "aerodactyl": "142", - "snorlax": "143", - "articuno": "144", - "zapdos": "145", - "moltres": "146", - "dratini": "147", - "dragonair": "148", - "dragonite": "149", - "mewtwo": "150", - "mew": "151", - "missingno.": "0" + "bulbasaur": "1", + "ivysaur": "2", + "venusaur": "3", + "charmander": "4", + "charmeleon": "5", + "charizard": "6", + "squirtle": "7", + "wartortle": "8", + "blastoise": "9", + "caterpie": "10", + "metapod": "11", + "butterfree": "12", + "weedle": "13", + "kakuna": "14", + "beedrill": "15", + "pidgey": "16", + "pidgeotto": "17", + "pidgeot": "18", + "rattata": "19", + "raticate": "20", + "spearow": "21", + "fearow": "22", + "ekans": "23", + "arbok": "24", + "pikachu": "25", + "raichu": "26", + "sandshrew": "27", + "sandslash": "28", + "nidoranf": "29", + "nidorina": "30", + "nidoqueen": "31", + "nidoranm": "32", + "nidorino": "33", + "nidoking": "34", + "clefairy": "35", + "clefable": "36", + "vulpix": "37", + "ninetales": "38", + "jigglypuff": "39", + "wigglytuff": "40", + "zubat": "41", + "golbat": "42", + "oddish": "43", + "gloom": "44", + "vileplume": "45", + "paras": "46", + "parasect": "47", + "venonat": "48", + "venomoth": "49", + "diglett": "50", + "dugtrio": "51", + "meowth": "52", + "persian": "53", + "psyduck": "54", + "golduck": "55", + "mankey": "56", + "primeape": "57", + "growlithe": "58", + "arcanine": "59", + "poliwag": "60", + "poliwhirl": "61", + "poliwrath": "62", + "abra": "63", + "kadabra": "64", + "alakazam": "65", + "machop": "66", + "machoke": "67", + "machamp": "68", + "bellsprout": "69", + "weepinbell": "70", + "victreebel": "71", + "tentacool": "72", + "tentacruel": "73", + "geodude": "74", + "graveler": "75", + "golem": "76", + "ponyta": "77", + "rapidash": "78", + "slowpoke": "79", + "slowbro": "80", + "magnemite": "81", + "magneton": "82", + "farfetch'd": "83", + "doduo": "84", + "dodrio": "85", + "seel": "86", + "dewgong": "87", + "grimer": "88", + "muk": "89", + "shellder": "90", + "cloyster": "91", + "gastly": "92", + "haunter": "93", + "gengar": "94", + "onix": "95", + "drowzee": "96", + "hypno": "97", + "krabby": "98", + "kingler": "99", + "voltorb": "100", + "electrode": "101", + "exeggcute": "102", + "exeggutor": "103", + "cubone": "104", + "marowak": "105", + "hitmonlee": "106", + "hitmonchan": "107", + "lickitung": "108", + "koffing": "109", + "weezing": "110", + "rhyhorn": "111", + "rhydon": "112", + "chansey": "113", + "tangela": "114", + "kangaskhan": "115", + "horsea": "116", + "seadra": "117", + "goldeen": "118", + "seaking": "119", + "staryu": "120", + "starmie": "121", + "mr. mime": "122", + "scyther": "123", + "jynx": "124", + "electabuzz": "125", + "magmar": "126", + "pinsir": "127", + "tauros": "128", + "magikarp": "129", + "gyarados": "130", + "lapras": "131", + "ditto": "132", + "eevee": "133", + "vaporeon": "134", + "jolteon": "135", + "flareon": "136", + "porygon": "137", + "omanyte": "138", + "omastar": "139", + "kabuto": "140", + "kabutops": "141", + "aerodactyl": "142", + "snorlax": "143", + "articuno": "144", + "zapdos": "145", + "moltres": "146", + "dratini": "147", + "dragonair": "148", + "dragonite": "149", + "mewtwo": "150", + "mew": "151", + "missingno.": "0" } diff --git a/assets/json/roast.json b/assets/json/roast.json index 42370abf..b2b671e3 100644 --- a/assets/json/roast.json +++ b/assets/json/roast.json @@ -1,36 +1,36 @@ [ - "*puts you in the oven*", - "You're so stupid.", - "Sorry, I can't hear you over how annoying you are.", - "I've got better things to do.", - "You're as dumb as Cleverbot.", - "Your IQ is lower than the Mariana Trench.", - "You're so annoying even the flies stay away from your stench.", - "Go away, please.", - "I'd give you a nasty look but you've already got one.", - "It looks like your face caught fire and someone tried to put it out with a hammer.", - "Your family tree must be a cactus because everyone on it is a prick.", - "Someday you will go far, and I hope you stay there.", - "The zoo called. They're wondering how you got out of your cage.", - "I was hoping for a battle of wits, but you appear to be unarmed.", - "You are proof that evolution can go in reverse.", - "Brains aren't everything, in your case, they're nothing.", - "Sorry I didn't get that, I don't speak idiot.", - "Why is it acceptable for you to be an idiot, but not for me to point it out?", - "We all sprang from apes, but you did not spring far enough.", - "You're an unknown command.", - "If you could go anywhere I chose, I'd choose dead.", - "Even monkeys can go to space, so clearly you lack some potential.", - "It's brains over brawn, yet you have neither.", - "You look like a monkey, and you smell like one too.", - "Even among idiots you're lacking.", - "You fail even when you're doing absolutely nothing.", - "If there was a vote for 'least likely to succeed' you'd win first prize.", - "I'm surrounded by idiots... Or, wait, that's just you.", - "I wanna go home. Well, really I just want to get away from the awful aroma you've got going there.", - "Every time you touch me I have to go home and wash all my clothes nine times just to get a normal smell back.", - "If I had a dollar for every brain you don't have, I'd have one dollar.", - "I'd help you succeed but you're incapable.", - "Your hairline is built like a graph chart, positive and negative forces attract but the clippers and your hair repel", - "I know a good joke! You!" + "*puts you in the oven*", + "You're so stupid.", + "Sorry, I can't hear you over how annoying you are.", + "I've got better things to do.", + "You're as dumb as Cleverbot.", + "Your IQ is lower than the Mariana Trench.", + "You're so annoying even the flies stay away from your stench.", + "Go away, please.", + "I'd give you a nasty look but you've already got one.", + "It looks like your face caught fire and someone tried to put it out with a hammer.", + "Your family tree must be a cactus because everyone on it is a prick.", + "Someday you will go far, and I hope you stay there.", + "The zoo called. They're wondering how you got out of your cage.", + "I was hoping for a battle of wits, but you appear to be unarmed.", + "You are proof that evolution can go in reverse.", + "Brains aren't everything, in your case, they're nothing.", + "Sorry I didn't get that, I don't speak idiot.", + "Why is it acceptable for you to be an idiot, but not for me to point it out?", + "We all sprang from apes, but you did not spring far enough.", + "You're an unknown command.", + "If you could go anywhere I chose, I'd choose dead.", + "Even monkeys can go to space, so clearly you lack some potential.", + "It's brains over brawn, yet you have neither.", + "You look like a monkey, and you smell like one too.", + "Even among idiots you're lacking.", + "You fail even when you're doing absolutely nothing.", + "If there was a vote for 'least likely to succeed' you'd win first prize.", + "I'm surrounded by idiots... Or, wait, that's just you.", + "I wanna go home. Well, really I just want to get away from the awful aroma you've got going there.", + "Every time you touch me I have to go home and wash all my clothes nine times just to get a normal smell back.", + "If I had a dollar for every brain you don't have, I'd have one dollar.", + "I'd help you succeed but you're incapable.", + "Your hairline is built like a graph chart, positive and negative forces attract but the clippers and your hair repel", + "I know a good joke! You!" ] diff --git a/assets/json/temmie.json b/assets/json/temmie.json index 43325a77..202d6642 100644 --- a/assets/json/temmie.json +++ b/assets/json/temmie.json @@ -1,231 +1,231 @@ { - "i": "tem", - "hi": "hoi", - "that": "dat", - "that's": "dat", - "hello": "hoi", - "me": "temmie", - "goodbye": "boi", - "bye": "boi", - "later": "boi", - "college": "colleg", - "money": "muns", - "food": "tem flakes", - "snack": "tem flakes", - "snacks": "tem flakes", - "meal": "tem flakes", - "meals": "tem flakes", - "human": "hooman", - "humans": "hoomans", - "chocolate": "choco", - "cute": "coot", - "allergic": "allergics", - "allergy": "allergics", - "do": "dos", - "does": "dos", - "what": "ppppppppp...", - "who": "ppppppppp...", - "when": "ppppppppp...", - "why": "ppppppppp...", - "where": "ppppppppp...", - "how": "ppppppppp...", - "xd": "xd", - "but": "b-but", - "store": "tem shop", - "restaurant": "tem shop", - "shop": "tem shop", - "temmie": "temmiy", - "sick": "holves", - "illness": "holves", - "ill": "holves", - "disease": "holves", - "cat": "tem", - "dog": "tem", - "hugs": "pets", - "pats": "pets", - "waves": "pets", - "high-fives": "pets", - "fistbumps": "pets", - "hug": "pet", - "pat": "pet", - "wave": "pet", - "high-five": "pet", - "fistbump": "pet", - "hungry": "hungr", - "muscles": "not coot", - "aw": "awwawa", - "yikes": "omg!", - "ah": "omg!", - "oh": "omg!", - "yipe": "omg!", - "wait": "omg!", - "yes": "yee!", - "no": "no!", - "person": "bark", - "monster": "munster", - "monsters": "munsters", - "great": "tem outta tem", - "awesome": "tem outta tem", - "cool": "tem outta tem", - "nice": "tem outta tem", - "good": "tem outta tem", - "walks": "vibrates", - "moves": "vibrates", - "sits": "vibrates", - "goes": "vibrates", - "runs": "vibrates intensely", - "climbs": "vibrates intensely", - "escapes": "vibrates intensely", - "normal": "bob", - "hmm": "p...", - "okay": "ok", - "lol": "lel", - "enemy": "special enemy", - "villain": "special enemy", - "badguy": "special enemy", - "school": "skool", - "um": "p...", - "elizabeth": "ebears", - "yeah": "yaya", - "yea": "yaya", - "uh-huh": "yaya", - "vampire": "wampire", - "tired": "*dies*", - "exhausted": "*dies*", - "bored": "*dies*", - "annoyed": "*dies*", - "irritated": "*dies*", - "mad": "*dies*", - "sleepy": "*dies*", - "confused": "*dies*", - "house": "tem villag", - "home": "tem villag", - "apartment": "tem villag", - "world": "undergroun", - "hotel": "mtt resort", - "motel": "mtt resort", - "inn": "mtt resort", - "cash": "g", - "gold": "g", - "jewels": "g", - "aaron": "not coot", - "boy": "tim", - "girl": "tem", - "we": "tems", - "you": "u", - "your": "ur", - "yours": "urs", - "there": "dere", - "proud": "prouds", - "random": "rando", - "see": "c", - "this": "dis", - "egg": "eg", - "very": "very!", - "excited": "excite", - "doesn't": "don't", - "sleep": "slep", - "noodles": "alphys foob", - "scream": "screems", - "gonna": "gunna", - "pasta": "papy foob", - "spaghetti": "papy foob", - "scary": "scaredy", - "frightening": "scaredy", - "worry": "worrys", - "worries": "worrys", - "sushi": "undyne foob", - "banana": "bernerner", - "bananas": "bernerners", - "apple": "oppl", - "apples": "oppls", - "grape": "grep", - "grapes": "greps", - "wonder": "wunders", - "wonders": "wunders", - "wondering": "wunders", - "wonderful": "wunderfull", - "think": "finks", - "thinks": "finks", - "thought": "finked", - "beat": "dunks", - "defeat": "dunks", - "defeated": "dunkd", - "they're": "their", - "their": "there", - "you're": "ur", - "because": "cuz", - "bc": "cuz", - "will": "wil", - "things": "thins", - "thing": "thin", - "science": "scienc", - "ice cream": "noice creem", - "spear": "speer", - "baby": "temini", - "babies": "teminis", - "child": "temini", - "children": "teminis", - "kid": "temini", - "kids": "teminis", - "bot": "xiao", - "robot": "mettatun", - "ghost": "bluuk", - "nap": "slep", - "boop": "blep", - "beep": "blep", - "bleep": "blep", - "bop": "blep", - "spider": "spoider", - "spiders": "sploiders", - "music": "moosics", - "again": "agin", - "the": "teh", - "family": "fam", - "smart": "smarts", - "smartness": "smartiness", - "intelligence": "smartiness", - "typo": "tpyo", - "typo'd": "tyop'd", - "typos": "typoys", - "yay": "yee", - "potato": "tato", - "potatoes": "tatos", - "fry": "fri", - "fries": "fri", - "burger": "glamburg", - "steak": "stek", - "heart": "hart", - "love": "lub", - "hate": "h8", - "like": "liek", - "library": "librarby", - "fire": "flemz", - "flame": "flemz", - "fires": "flemz", - "flames": "flemz", - "witchcraft": "magics", - "witchcrafts": "magics", - "magic": "magics", - "sorcery": "magics", - "superpower": "magics", - "superpowers": "magics", - "sorceries": "magics", - "and": "n", - "my": "tem's", - "mine": "tem's", - "everyone": "everytem", - "anyone": "anytem", - "someone": "sometem", - "everbody": "everytemmie", - "anybody": "anytemmie", - "somebody": "sometemmie", - "beautiful": "booftifull", - "pretty": "prety", - "so": "soooo", - "help": "halp", - "uh-uh": "nuh", - "nope": "nuh", - "nuh-uh": "nuh", - "please": "pls" + "i": "tem", + "hi": "hoi", + "that": "dat", + "that's": "dat", + "hello": "hoi", + "me": "temmie", + "goodbye": "boi", + "bye": "boi", + "later": "boi", + "college": "colleg", + "money": "muns", + "food": "tem flakes", + "snack": "tem flakes", + "snacks": "tem flakes", + "meal": "tem flakes", + "meals": "tem flakes", + "human": "hooman", + "humans": "hoomans", + "chocolate": "choco", + "cute": "coot", + "allergic": "allergics", + "allergy": "allergics", + "do": "dos", + "does": "dos", + "what": "ppppppppp...", + "who": "ppppppppp...", + "when": "ppppppppp...", + "why": "ppppppppp...", + "where": "ppppppppp...", + "how": "ppppppppp...", + "xd": "xd", + "but": "b-but", + "store": "tem shop", + "restaurant": "tem shop", + "shop": "tem shop", + "temmie": "temmiy", + "sick": "holves", + "illness": "holves", + "ill": "holves", + "disease": "holves", + "cat": "tem", + "dog": "tem", + "hugs": "pets", + "pats": "pets", + "waves": "pets", + "high-fives": "pets", + "fistbumps": "pets", + "hug": "pet", + "pat": "pet", + "wave": "pet", + "high-five": "pet", + "fistbump": "pet", + "hungry": "hungr", + "muscles": "not coot", + "aw": "awwawa", + "yikes": "omg!", + "ah": "omg!", + "oh": "omg!", + "yipe": "omg!", + "wait": "omg!", + "yes": "yee!", + "no": "no!", + "person": "bark", + "monster": "munster", + "monsters": "munsters", + "great": "tem outta tem", + "awesome": "tem outta tem", + "cool": "tem outta tem", + "nice": "tem outta tem", + "good": "tem outta tem", + "walks": "vibrates", + "moves": "vibrates", + "sits": "vibrates", + "goes": "vibrates", + "runs": "vibrates intensely", + "climbs": "vibrates intensely", + "escapes": "vibrates intensely", + "normal": "bob", + "hmm": "p...", + "okay": "ok", + "lol": "lel", + "enemy": "special enemy", + "villain": "special enemy", + "badguy": "special enemy", + "school": "skool", + "um": "p...", + "elizabeth": "ebears", + "yeah": "yaya", + "yea": "yaya", + "uh-huh": "yaya", + "vampire": "wampire", + "tired": "*dies*", + "exhausted": "*dies*", + "bored": "*dies*", + "annoyed": "*dies*", + "irritated": "*dies*", + "mad": "*dies*", + "sleepy": "*dies*", + "confused": "*dies*", + "house": "tem villag", + "home": "tem villag", + "apartment": "tem villag", + "world": "undergroun", + "hotel": "mtt resort", + "motel": "mtt resort", + "inn": "mtt resort", + "cash": "g", + "gold": "g", + "jewels": "g", + "aaron": "not coot", + "boy": "tim", + "girl": "tem", + "we": "tems", + "you": "u", + "your": "ur", + "yours": "urs", + "there": "dere", + "proud": "prouds", + "random": "rando", + "see": "c", + "this": "dis", + "egg": "eg", + "very": "very!", + "excited": "excite", + "doesn't": "don't", + "sleep": "slep", + "noodles": "alphys foob", + "scream": "screems", + "gonna": "gunna", + "pasta": "papy foob", + "spaghetti": "papy foob", + "scary": "scaredy", + "frightening": "scaredy", + "worry": "worrys", + "worries": "worrys", + "sushi": "undyne foob", + "banana": "bernerner", + "bananas": "bernerners", + "apple": "oppl", + "apples": "oppls", + "grape": "grep", + "grapes": "greps", + "wonder": "wunders", + "wonders": "wunders", + "wondering": "wunders", + "wonderful": "wunderfull", + "think": "finks", + "thinks": "finks", + "thought": "finked", + "beat": "dunks", + "defeat": "dunks", + "defeated": "dunkd", + "they're": "their", + "their": "there", + "you're": "ur", + "because": "cuz", + "bc": "cuz", + "will": "wil", + "things": "thins", + "thing": "thin", + "science": "scienc", + "ice cream": "noice creem", + "spear": "speer", + "baby": "temini", + "babies": "teminis", + "child": "temini", + "children": "teminis", + "kid": "temini", + "kids": "teminis", + "bot": "xiao", + "robot": "mettatun", + "ghost": "bluuk", + "nap": "slep", + "boop": "blep", + "beep": "blep", + "bleep": "blep", + "bop": "blep", + "spider": "spoider", + "spiders": "sploiders", + "music": "moosics", + "again": "agin", + "the": "teh", + "family": "fam", + "smart": "smarts", + "smartness": "smartiness", + "intelligence": "smartiness", + "typo": "tpyo", + "typo'd": "tyop'd", + "typos": "typoys", + "yay": "yee", + "potato": "tato", + "potatoes": "tatos", + "fry": "fri", + "fries": "fri", + "burger": "glamburg", + "steak": "stek", + "heart": "hart", + "love": "lub", + "hate": "h8", + "like": "liek", + "library": "librarby", + "fire": "flemz", + "flame": "flemz", + "fires": "flemz", + "flames": "flemz", + "witchcraft": "magics", + "witchcrafts": "magics", + "magic": "magics", + "sorcery": "magics", + "superpower": "magics", + "superpowers": "magics", + "sorceries": "magics", + "and": "n", + "my": "tem's", + "mine": "tem's", + "everyone": "everytem", + "anyone": "anytem", + "someone": "sometem", + "everbody": "everytemmie", + "anybody": "anytemmie", + "somebody": "sometemmie", + "beautiful": "booftifull", + "pretty": "prety", + "so": "soooo", + "help": "halp", + "uh-uh": "nuh", + "nope": "nuh", + "nuh-uh": "nuh", + "please": "pls" } diff --git a/assets/json/translate.json b/assets/json/translate.json index d283e30b..8cedc0da 100644 --- a/assets/json/translate.json +++ b/assets/json/translate.json @@ -1,95 +1,95 @@ { - "az": "Azerbaijan", - "sq": "Albanian", - "am": "Amharic", - "en": "English", - "ar": "Arabic", - "hy": "Armenian", - "af": "Afrikaans", - "eu": "Basque", - "ba": "Bashkir", - "be": "Belarusian", - "bn": "Bengali", - "my": "Burmese", - "bg": "Bulgarian", - "bs": "Bosnian", - "cy": "Welsh", - "hu": "Hungarian", - "vi": "Vietnamese", - "ht": "Haitian (Creole)", - "gl": "Galician", - "nl": "Dutch", - "mrj": "Hill Mari", - "el": "Greek", - "ka": "Georgian", - "gu": "Gujarati", - "da": "Danish", - "he": "Hebrew", - "yi": "Yiddish", - "id": "Indonesian", - "ga": "Irish", - "it": "Italian", - "is": "Icelandic", - "es": "Spanish", - "kk": "Kazakh", - "kn": "Kannada", - "ca": "Catalan", - "ky": "Kyrgyz", - "zh": "Chinese", - "ko": "Korean", - "xh": "Xhosa", - "km": "Khmer", - "lo": "Laotian", - "la": "Latin", - "lv": "Latvian", - "lt": "Lithuanian", - "lb": "Luxembourgish", - "mg": "Malagasy", - "ms": "Malay", - "ml": "Malayalam", - "mt": "Maltese", - "mk": "Macedonian", - "mi": "Maori", - "mr": "Marathi", - "mhr": "Mari", - "mn": "Mongolian", - "de": "German", - "ne": "Nepali", - "no": "Norwegian", - "pa": "Punjabi", - "pap": "Papiamento", - "fa": "Persian", - "pl": "Polish", - "pt": "Portuguese", - "ro": "Romanian", - "ru": "Russian", - "ceb": "Cebuano", - "sr": "Serbian", - "si": "Sinhala", - "sk": "Slovakian", - "sl": "Slovenian", - "sw": "Swahili", - "su": "Sundanese", - "tg": "Tajik", - "th": "Thai", - "tl": "Tagalog", - "ta": "Tamil", - "tt": "Tatar", - "te": "Telugu", - "tr": "Turkish", - "udm": "Udmurt", - "uz": "Uzbek", - "uk": "Ukranian", - "ur": "Urdu", - "fi": "Finnish", - "fr": "French", - "hi": "Hindi", - "hr": "Croatian", - "cs": "Czech", - "sv": "Swedish", - "gd": "Scottish", - "et": "Estonian", - "eo": "Esperanto", - "jv": "Javanese", - "ja": "Japanese" + "az": "Azerbaijan", + "sq": "Albanian", + "am": "Amharic", + "en": "English", + "ar": "Arabic", + "hy": "Armenian", + "af": "Afrikaans", + "eu": "Basque", + "ba": "Bashkir", + "be": "Belarusian", + "bn": "Bengali", + "my": "Burmese", + "bg": "Bulgarian", + "bs": "Bosnian", + "cy": "Welsh", + "hu": "Hungarian", + "vi": "Vietnamese", + "ht": "Haitian (Creole)", + "gl": "Galician", + "nl": "Dutch", + "mrj": "Hill Mari", + "el": "Greek", + "ka": "Georgian", + "gu": "Gujarati", + "da": "Danish", + "he": "Hebrew", + "yi": "Yiddish", + "id": "Indonesian", + "ga": "Irish", + "it": "Italian", + "is": "Icelandic", + "es": "Spanish", + "kk": "Kazakh", + "kn": "Kannada", + "ca": "Catalan", + "ky": "Kyrgyz", + "zh": "Chinese", + "ko": "Korean", + "xh": "Xhosa", + "km": "Khmer", + "lo": "Laotian", + "la": "Latin", + "lv": "Latvian", + "lt": "Lithuanian", + "lb": "Luxembourgish", + "mg": "Malagasy", + "ms": "Malay", + "ml": "Malayalam", + "mt": "Maltese", + "mk": "Macedonian", + "mi": "Maori", + "mr": "Marathi", + "mhr": "Mari", + "mn": "Mongolian", + "de": "German", + "ne": "Nepali", + "no": "Norwegian", + "pa": "Punjabi", + "pap": "Papiamento", + "fa": "Persian", + "pl": "Polish", + "pt": "Portuguese", + "ro": "Romanian", + "ru": "Russian", + "ceb": "Cebuano", + "sr": "Serbian", + "si": "Sinhala", + "sk": "Slovakian", + "sl": "Slovenian", + "sw": "Swahili", + "su": "Sundanese", + "tg": "Tajik", + "th": "Thai", + "tl": "Tagalog", + "ta": "Tamil", + "tt": "Tatar", + "te": "Telugu", + "tr": "Turkish", + "udm": "Udmurt", + "uz": "Uzbek", + "uk": "Ukranian", + "ur": "Urdu", + "fi": "Finnish", + "fr": "French", + "hi": "Hindi", + "hr": "Croatian", + "cs": "Czech", + "sv": "Swedish", + "gd": "Scottish", + "et": "Estonian", + "eo": "Esperanto", + "jv": "Javanese", + "ja": "Japanese" } diff --git a/assets/json/typing-game.json b/assets/json/typing-game.json index 8d5419fb..98acfcff 100644 --- a/assets/json/typing-game.json +++ b/assets/json/typing-game.json @@ -1,48 +1,48 @@ { - "sentences": [ - "The quick brown fox jumps over the lazy dog.", - "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.", - "How razorback-jumping frogs can level six piqued gymnasts!", - "Amazingly few discotheques provide jukeboxes.", - "I am so blue I'm greener than purple.", - "I stepped on a Corn Flake, now I'm a Cereal Killer.", - "On a scale from one to ten what is your favourite colour of the alphabet?", - "The sparkly lamp ate a pillow then punched Larry.", - "My world is where everybody is a pony and we all eat rainbows and poop butterflies.", - "If your canoe is stuck in a tree with the headlights on, how many pancakes does it take to get to the moon?", - "There's a purple mushroom in my backyard, screaming Taco's!", - "When life gives you lemons, chuck them at people you hate.", - "I think I will buy the red car, or I will lease the blue one.", - "Italy is my favorite country; in fact, I plan to spend two weeks there next year.", - "She borrowed the book from him many years ago and hasn't yet returned it.", - "Lets all be unique together until we realise we are all the same.", - "If Purple People Eaters are real… where do they find purple people to eat?", - "The waves were crashing on the shore; it was a lovely sight.", - "This is the last random sentence I will be writing and I am going to stop mid-sent.", - "The memory we used to share is no longer coherent.", - "She did not cheat on the test, for it was not the right thing to do.", - "She only paints with bold colors; she does not like pastels.", - "Malls are great places to shop; I can find everything I need under one roof.", - "The body may perhaps compensates for the loss of a true metaphysics.", - "They got there early, and they got really good seats.", - "Everyone was busy, so I went to the movie alone.", - "Yeah, I think it's a good environment for learning English.", - "I would have gotten the promotion, but my attendance wasn’t good enough.", - "There were white out conditions in the town; subsequently, the roads were impassable.", - "If you like tuna and tomato sauce- try combining the two. It’s really not as bad as it sounds." - ], - "difficulties": [ - "easy", - "medium", - "hard", - "extreme", - "impossible" - ], - "times": { - "easy": 25000, - "medium": 20000, - "hard": 15000, - "extreme": 10000, - "impossible": 5000 - } + "sentences": [ + "The quick brown fox jumps over the lazy dog.", + "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.", + "How razorback-jumping frogs can level six piqued gymnasts!", + "Amazingly few discotheques provide jukeboxes.", + "I am so blue I'm greener than purple.", + "I stepped on a Corn Flake, now I'm a Cereal Killer.", + "On a scale from one to ten what is your favourite colour of the alphabet?", + "The sparkly lamp ate a pillow then punched Larry.", + "My world is where everybody is a pony and we all eat rainbows and poop butterflies.", + "If your canoe is stuck in a tree with the headlights on, how many pancakes does it take to get to the moon?", + "There's a purple mushroom in my backyard, screaming Taco's!", + "When life gives you lemons, chuck them at people you hate.", + "I think I will buy the red car, or I will lease the blue one.", + "Italy is my favorite country; in fact, I plan to spend two weeks there next year.", + "She borrowed the book from him many years ago and hasn't yet returned it.", + "Lets all be unique together until we realise we are all the same.", + "If Purple People Eaters are real… where do they find purple people to eat?", + "The waves were crashing on the shore; it was a lovely sight.", + "This is the last random sentence I will be writing and I am going to stop mid-sent.", + "The memory we used to share is no longer coherent.", + "She did not cheat on the test, for it was not the right thing to do.", + "She only paints with bold colors; she does not like pastels.", + "Malls are great places to shop; I can find everything I need under one roof.", + "The body may perhaps compensates for the loss of a true metaphysics.", + "They got there early, and they got really good seats.", + "Everyone was busy, so I went to the movie alone.", + "Yeah, I think it's a good environment for learning English.", + "I would have gotten the promotion, but my attendance wasn’t good enough.", + "There were white out conditions in the town; subsequently, the roads were impassable.", + "If you like tuna and tomato sauce- try combining the two. It’s really not as bad as it sounds." + ], + "difficulties": [ + "easy", + "medium", + "hard", + "extreme", + "impossible" + ], + "times": { + "easy": 25000, + "medium": 20000, + "hard": 15000, + "extreme": 10000, + "impossible": 5000 + } } diff --git a/assets/json/upside-down.json b/assets/json/upside-down.json index a88430b5..fd45157d 100644 --- a/assets/json/upside-down.json +++ b/assets/json/upside-down.json @@ -1,54 +1,54 @@ { - "a": "ɐ", - "b": "q", - "c": "ɔ", - "d": "p", - "e": "ǝ", - "f": "ɟ", - "g": "ƃ", - "h": "ɥ", - "i": "ᴉ", - "j": "ɾ", - "k": "ʞ", - "m": "ɯ", - "n": "u", - "p": "d", - "q": "b", - "r": "ɹ", - "t": "ʇ", - "u": "n", - "v": "ʌ", - "w": "ʍ", - "y": "ʎ", - "A": "∀", - "C": "Ɔ", - "E": "Ǝ", - "F": "Ⅎ", - "G": "פ", - "J": "ſ", - "L": "˥", - "M": "W", - "P": "Ԁ", - "T": "┴", - "U": "∩", - "V": "Λ", - "W": "M", - "Y": "⅄", - "1": "Ɩ", - "2": "ᄅ", - "3": "Ɛ", - "4": "ㄣ", - "5": "ϛ", - "6": "9", - "7": "ㄥ", - "9": "6", - ",": "'", - ".": "˙", - "'": ",", - "\"": ",,", - "_": "‾", - "&": "⅋", - "!": "¡", - "?": "¿", - "`": "," + "a": "ɐ", + "b": "q", + "c": "ɔ", + "d": "p", + "e": "ǝ", + "f": "ɟ", + "g": "ƃ", + "h": "ɥ", + "i": "ᴉ", + "j": "ɾ", + "k": "ʞ", + "m": "ɯ", + "n": "u", + "p": "d", + "q": "b", + "r": "ɹ", + "t": "ʇ", + "u": "n", + "v": "ʌ", + "w": "ʍ", + "y": "ʎ", + "A": "∀", + "C": "Ɔ", + "E": "Ǝ", + "F": "Ⅎ", + "G": "פ", + "J": "ſ", + "L": "˥", + "M": "W", + "P": "Ԁ", + "T": "┴", + "U": "∩", + "V": "Λ", + "W": "M", + "Y": "⅄", + "1": "Ɩ", + "2": "ᄅ", + "3": "Ɛ", + "4": "ㄣ", + "5": "ϛ", + "6": "9", + "7": "ㄥ", + "9": "6", + ",": "'", + ".": "˙", + "'": ",", + "\"": ",,", + "_": "‾", + "&": "⅋", + "!": "¡", + "?": "¿", + "`": "," } diff --git a/assets/json/user-info.json b/assets/json/user-info.json index f992c636..cf10c9fd 100644 --- a/assets/json/user-info.json +++ b/assets/json/user-info.json @@ -1,6 +1,6 @@ { - "online": "<:online:313956277808005120> Online", - "idle": "<:away:313956277220802560> Idle", - "dnd": "<:dnd:313956276893646850> Do Not Disturb", - "offline": "<:offline:313956277237710868> Offline" + "online": "<:online:313956277808005120> Online", + "idle": "<:away:313956277220802560> Idle", + "dnd": "<:dnd:313956276893646850> Do Not Disturb", + "offline": "<:offline:313956277237710868> Offline" } diff --git a/assets/json/vocaloid.json b/assets/json/vocaloid.json index 0c26a3a5..48fcccea 100644 --- a/assets/json/vocaloid.json +++ b/assets/json/vocaloid.json @@ -1,42 +1,42 @@ [ - "https://www.youtube.com/watch?v=ebAKoRcYFTA", - "https://www.youtube.com/watch?v=Mqps4anhz0Q", - "https://www.youtube.com/watch?v=AUEiHQOCQ2M", - "https://www.youtube.com/watch?v=oyteTOBxRm8", - "https://www.youtube.com/watch?v=uwwU55zBYlQ", - "https://www.youtube.com/watch?v=sSYoz0JmnZo", - "https://www.youtube.com/watch?v=NpU4dsXW6EI", - "https://www.youtube.com/watch?v=MzyXD8bNbvk", - "https://www.youtube.com/watch?v=hyV4qGAPKac", - "https://www.youtube.com/watch?v=pywNi6gD1FA", - "https://www.youtube.com/watch?v=17FEtaiWdVg", - "https://www.youtube.com/watch?v=fmrA-gxJxgQ", - "https://www.youtube.com/watch?v=yOBWgSPrYVA", - "https://www.youtube.com/watch?v=nCaqf9WhqOY", - "https://www.youtube.com/watch?v=cQKGUgOfD8U", - "https://www.youtube.com/watch?v=sK92X82T3Sk", - "https://www.youtube.com/watch?v=AH5_sKwDw1E", - "https://www.youtube.com/watch?v=dw-KJNqcK-Q", - "https://www.youtube.com/watch?v=X47JmmqbMvc", - "https://www.youtube.com/watch?v=ojQPpYVQt7U", - "https://www.youtube.com/watch?v=N1-Z8uslIsI", - "https://www.youtube.com/watch?v=EAgk-t2zzqw", - "https://www.youtube.com/watch?v=uLBC2kWYFo8", - "https://www.youtube.com/watch?v=OXHYIlkZLUU", - "https://www.youtube.com/watch?v=ObIa9wXbyMQ", - "https://www.youtube.com/watch?v=dGNoCICGmo0", - "https://www.youtube.com/watch?v=LcoyEZkTKfY", - "https://www.youtube.com/watch?v=mKHaW0qd5Mw", - "https://www.youtube.com/watch?v=GG627DYk_E4", - "https://www.youtube.com/watch?v=jTm6Q5Pj_Jo", - "https://www.youtube.com/watch?v=TVeIDmk3rBo", - "https://www.youtube.com/watch?v=1K3in6w9tt4", - "https://www.youtube.com/watch?v=07r67gGbtLQ", - "https://www.youtube.com/watch?v=243vPl8HdVk", - "https://www.youtube.com/watch?v=zweVJrnE1uY", - "https://www.youtube.com/watch?v=RKtoreimcQ8", - "https://www.youtube.com/watch?v=Je6dCVfHvkU", - "https://www.youtube.com/watch?v=UxFv12y_evM", - "https://www.youtube.com/watch?v=2HegQtmJeto", - "https://www.youtube.com/watch?v=8-Epnpruww0" + "https://www.youtube.com/watch?v=ebAKoRcYFTA", + "https://www.youtube.com/watch?v=Mqps4anhz0Q", + "https://www.youtube.com/watch?v=AUEiHQOCQ2M", + "https://www.youtube.com/watch?v=oyteTOBxRm8", + "https://www.youtube.com/watch?v=uwwU55zBYlQ", + "https://www.youtube.com/watch?v=sSYoz0JmnZo", + "https://www.youtube.com/watch?v=NpU4dsXW6EI", + "https://www.youtube.com/watch?v=MzyXD8bNbvk", + "https://www.youtube.com/watch?v=hyV4qGAPKac", + "https://www.youtube.com/watch?v=pywNi6gD1FA", + "https://www.youtube.com/watch?v=17FEtaiWdVg", + "https://www.youtube.com/watch?v=fmrA-gxJxgQ", + "https://www.youtube.com/watch?v=yOBWgSPrYVA", + "https://www.youtube.com/watch?v=nCaqf9WhqOY", + "https://www.youtube.com/watch?v=cQKGUgOfD8U", + "https://www.youtube.com/watch?v=sK92X82T3Sk", + "https://www.youtube.com/watch?v=AH5_sKwDw1E", + "https://www.youtube.com/watch?v=dw-KJNqcK-Q", + "https://www.youtube.com/watch?v=X47JmmqbMvc", + "https://www.youtube.com/watch?v=ojQPpYVQt7U", + "https://www.youtube.com/watch?v=N1-Z8uslIsI", + "https://www.youtube.com/watch?v=EAgk-t2zzqw", + "https://www.youtube.com/watch?v=uLBC2kWYFo8", + "https://www.youtube.com/watch?v=OXHYIlkZLUU", + "https://www.youtube.com/watch?v=ObIa9wXbyMQ", + "https://www.youtube.com/watch?v=dGNoCICGmo0", + "https://www.youtube.com/watch?v=LcoyEZkTKfY", + "https://www.youtube.com/watch?v=mKHaW0qd5Mw", + "https://www.youtube.com/watch?v=GG627DYk_E4", + "https://www.youtube.com/watch?v=jTm6Q5Pj_Jo", + "https://www.youtube.com/watch?v=TVeIDmk3rBo", + "https://www.youtube.com/watch?v=1K3in6w9tt4", + "https://www.youtube.com/watch?v=07r67gGbtLQ", + "https://www.youtube.com/watch?v=243vPl8HdVk", + "https://www.youtube.com/watch?v=zweVJrnE1uY", + "https://www.youtube.com/watch?v=RKtoreimcQ8", + "https://www.youtube.com/watch?v=Je6dCVfHvkU", + "https://www.youtube.com/watch?v=UxFv12y_evM", + "https://www.youtube.com/watch?v=2HegQtmJeto", + "https://www.youtube.com/watch?v=8-Epnpruww0" ] diff --git a/assets/json/xiao.json b/assets/json/xiao.json index a36e6e2e..487dee69 100644 --- a/assets/json/xiao.json +++ b/assets/json/xiao.json @@ -1,12 +1,12 @@ [ - "https://i.imgur.com/Nh2LjC2.jpg", - "https://i.imgur.com/PC2ONfo.jpg", - "https://i.imgur.com/RHJpMsq.jpg", - "https://i.imgur.com/ufLAjPy.jpg", - "https://i.imgur.com/q4FcJAh.jpg", - "https://i.imgur.com/86wDaxo.png", - "https://i.imgur.com/ZziLhLt.jpg", - "https://i.imgur.com/wc5Zl0q.png", - "https://i.imgur.com/eHpScR2.jpg", - "https://i.imgur.com/Nj5N9Qp.png" + "https://i.imgur.com/Nh2LjC2.jpg", + "https://i.imgur.com/PC2ONfo.jpg", + "https://i.imgur.com/RHJpMsq.jpg", + "https://i.imgur.com/ufLAjPy.jpg", + "https://i.imgur.com/q4FcJAh.jpg", + "https://i.imgur.com/86wDaxo.png", + "https://i.imgur.com/ZziLhLt.jpg", + "https://i.imgur.com/wc5Zl0q.png", + "https://i.imgur.com/eHpScR2.jpg", + "https://i.imgur.com/Nj5N9Qp.png" ] diff --git a/commands/avatar-edit/3000-years.js b/commands/avatar-edit/3000-years.js index ea8e5377..9c2180ae 100644 --- a/commands/avatar-edit/3000-years.js +++ b/commands/avatar-edit/3000-years.js @@ -4,46 +4,46 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class YearsCommand extends Command { - constructor(client) { - super(client, { - name: '3000-years', - aliases: ['az', '3ky', '3k-years'], - group: 'avatar-edit', - memberName: '3000-years', - description: 'Draws a user\'s avatar over Pokémon\'s "It\'s been 3000 years" meme.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: '3000-years', + aliases: ['az', '3ky', '3k-years'], + group: 'avatar-edit', + memberName: '3000-years', + description: 'Draws a user\'s avatar over Pokémon\'s "It\'s been 3000 years" meme.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(856, 569); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', '3000-years.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(base, 0, 0); - ctx.drawImage(avatar, 461, 127, 200, 200); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(856, 569); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', '3000-years.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(base, 0, 0); + ctx.drawImage(avatar, 461, 127, 200, 200); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/approved.js b/commands/avatar-edit/approved.js index 78ded053..b2bb84ce 100644 --- a/commands/avatar-edit/approved.js +++ b/commands/avatar-edit/approved.js @@ -4,46 +4,46 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class ApprovedCommand extends Command { - constructor(client) { - super(client, { - name: 'approved', - aliases: ['approve'], - group: 'avatar-edit', - memberName: 'approved', - description: 'Draws an "approved" stamp over a user\'s avatar.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'approved', + aliases: ['approve'], + group: 'avatar-edit', + memberName: 'approved', + description: 'Draws an "approved" stamp over a user\'s avatar.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(256, 256); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'approved.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(avatar, 0, 0, 256, 256); - ctx.drawImage(base, 0, 0, 256, 256); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'approved.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(256, 256); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'approved.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(avatar, 0, 0, 256, 256); + ctx.drawImage(base, 0, 0, 256, 256); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'approved.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/beautiful.js b/commands/avatar-edit/beautiful.js index 92c43054..40fffbb2 100644 --- a/commands/avatar-edit/beautiful.js +++ b/commands/avatar-edit/beautiful.js @@ -4,47 +4,47 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class BeautifulCommand extends Command { - constructor(client) { - super(client, { - name: 'beautiful', - aliases: ['grunkle-stan'], - group: 'avatar-edit', - memberName: 'beautiful', - description: 'Draws a user\'s avatar over Gravity Falls\' "Oh, this? This is beautiful." meme.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'beautiful', + aliases: ['grunkle-stan'], + group: 'avatar-edit', + memberName: 'beautiful', + description: 'Draws a user\'s avatar over Gravity Falls\' "Oh, this? This is beautiful." meme.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(500, 532); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'beautiful.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(base, 0, 0); - ctx.drawImage(avatar, 341, 35, 117, 135); - ctx.drawImage(avatar, 343, 301, 117, 135); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(500, 532); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'beautiful.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(base, 0, 0); + ctx.drawImage(avatar, 341, 35, 117, 135); + ctx.drawImage(avatar, 343, 301, 117, 135); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/bob-ross.js b/commands/avatar-edit/bob-ross.js index daa57d65..a790e42b 100644 --- a/commands/avatar-edit/bob-ross.js +++ b/commands/avatar-edit/bob-ross.js @@ -4,50 +4,50 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class BobRossCommand extends Command { - constructor(client) { - super(client, { - name: 'bob-ross', - aliases: ['ross'], - group: 'avatar-edit', - memberName: 'bob-ross', - description: 'Draws a user\'s avatar over Bob Ross\' canvas.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'bob-ross', + aliases: ['ross'], + group: 'avatar-edit', + memberName: 'bob-ross', + description: 'Draws a user\'s avatar over Bob Ross\' canvas.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(600, 775); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'bob-ross.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.fillStyle = 'white'; - ctx.fillRect(0, 0, 600, 775); - ctx.rotate(3 * Math.PI / 180); - ctx.drawImage(avatar, 69, 102, 256, 256); - ctx.rotate(-3 * Math.PI / 180); - ctx.drawImage(base, 0, 0); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bob-ross.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(600, 775); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'bob-ross.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.fillStyle = 'white'; + ctx.fillRect(0, 0, 600, 775); + ctx.rotate(3 * Math.PI / 180); + ctx.drawImage(avatar, 69, 102, 256, 256); + ctx.rotate(-3 * Math.PI / 180); + ctx.drawImage(base, 0, 0); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bob-ross.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/card.js b/commands/avatar-edit/card.js index f7697bc9..424f3c82 100644 --- a/commands/avatar-edit/card.js +++ b/commands/avatar-edit/card.js @@ -6,68 +6,68 @@ const path = require('path'); const { version } = require('../../package'); module.exports = class CardCommand extends Command { - constructor(client) { - super(client, { - name: 'card', - aliases: ['discord-card'], - group: 'avatar-edit', - memberName: 'card', - description: 'Creates a trading card of random rarity based on a user\'s profile.', - guildOnly: true, - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'member', - prompt: 'Which user would you like to edit the avatar of?', - type: 'member', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'card', + aliases: ['discord-card'], + group: 'avatar-edit', + memberName: 'card', + description: 'Creates a trading card of random rarity based on a user\'s profile.', + guildOnly: true, + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'member', + prompt: 'Which user would you like to edit the avatar of?', + type: 'member', + default: '' + } + ] + }); + } - async run(msg, args) { - const member = args.member || msg.member; - const avatarURL = member.user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const cardID = Math.floor(Math.random() * (9999 - 1000 + 1)) + 1000; - let rarity; - if (cardID < 5000) rarity = 'C'; - else if (cardID < 8000) rarity = 'U'; - else rarity = 'R'; - parseFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'Roboto.ttf'), { family: 'Roboto' }); - const canvas = createCanvas(390, 544); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'card.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.fillStyle = 'white'; - ctx.fillRect(0, 0, 390, 544); - ctx.drawImage(avatar, 11, 11, 370, 370); - ctx.drawImage(base, 0, 0); - ctx.font = '18px Roboto'; - ctx.fillStyle = 'black'; - ctx.fillText(member.displayName, 30, 62); - ctx.fillText('Discord Join Date:', 148, 400); - ctx.fillText(moment(member.user.createdTimestamp).format('MMMM Do YYYY'), 148, 420); - ctx.fillText('Role:', 148, 457); - ctx.fillText(member.highestRole.name, 148, 477); - ctx.fillText(rarity, 73, 411); - ctx.fillText(cardID, 60, 457); - ctx.fillText(version.split('.')[0], 68, 502); - ctx.font = '14px Roboto'; - ctx.fillText(member.id, 30, 355); - ctx.fillText(`#${member.user.discriminator}`, 313, 355); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const member = args.member || msg.member; + const avatarURL = member.user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const cardID = Math.floor(Math.random() * (9999 - 1000 + 1)) + 1000; + let rarity; + if (cardID < 5000) rarity = 'C'; + else if (cardID < 8000) rarity = 'U'; + else rarity = 'R'; + parseFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'Roboto.ttf'), { family: 'Roboto' }); + const canvas = createCanvas(390, 544); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'card.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.fillStyle = 'white'; + ctx.fillRect(0, 0, 390, 544); + ctx.drawImage(avatar, 11, 11, 370, 370); + ctx.drawImage(base, 0, 0); + ctx.font = '18px Roboto'; + ctx.fillStyle = 'black'; + ctx.fillText(member.displayName, 30, 62); + ctx.fillText('Discord Join Date:', 148, 400); + ctx.fillText(moment(member.user.createdTimestamp).format('MMMM Do YYYY'), 148, 420); + ctx.fillText('Role:', 148, 457); + ctx.fillText(member.highestRole.name, 148, 477); + ctx.fillText(rarity, 73, 411); + ctx.fillText(cardID, 60, 457); + ctx.fillText(version.split('.')[0], 68, 502); + ctx.font = '14px Roboto'; + ctx.fillText(member.id, 30, 355); + ctx.fillText(`#${member.user.discriminator}`, 313, 355); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/challenger.js b/commands/avatar-edit/challenger.js index 2d09f874..68eba95e 100644 --- a/commands/avatar-edit/challenger.js +++ b/commands/avatar-edit/challenger.js @@ -4,47 +4,47 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class ChallengerCommand extends Command { - constructor(client) { - super(client, { - name: 'challenger', - group: 'avatar-edit', - memberName: 'challenger', - description: 'Draws a user\'s avatar over Super Smash Bros.\'s "Challenger Approaching" screen.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'challenger', + group: 'avatar-edit', + memberName: 'challenger', + description: 'Draws a user\'s avatar over Super Smash Bros.\'s "Challenger Approaching" screen.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(500, 500); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'challenger.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.fillStyle = '#ff0028'; - ctx.fillRect(0, 0, 500, 500); - ctx.drawImage(avatar, 226, 155, 200, 200); - ctx.drawImage(base, 0, 0); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'challenger.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(500, 500); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'challenger.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.fillStyle = '#ff0028'; + ctx.fillRect(0, 0, 500, 500); + ctx.drawImage(avatar, 226, 155, 200, 200); + ctx.drawImage(base, 0, 0); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'challenger.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/dexter.js b/commands/avatar-edit/dexter.js index 6b6554dc..06c93ff2 100644 --- a/commands/avatar-edit/dexter.js +++ b/commands/avatar-edit/dexter.js @@ -4,47 +4,47 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class DexterCommand extends Command { - constructor(client) { - super(client, { - name: 'dexter', - group: 'avatar-edit', - memberName: 'dexter', - description: 'Draws a user\'s avatar over Dexter from Pokémon\'s screen.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'dexter', + group: 'avatar-edit', + memberName: 'dexter', + description: 'Draws a user\'s avatar over Dexter from Pokémon\'s screen.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(744, 554); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'dexter.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(base, 0, 0); - ctx.rotate(-11 * Math.PI / 180); - ctx.drawImage(avatar, 234, 274, 225, 225); - ctx.rotate(11 * Math.PI / 180); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'dexter.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(744, 554); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'dexter.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(base, 0, 0); + ctx.rotate(-11 * Math.PI / 180); + ctx.drawImage(avatar, 234, 274, 225, 225); + ctx.rotate(11 * Math.PI / 180); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'dexter.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/greyscale.js b/commands/avatar-edit/greyscale.js index 9ea5c570..21c53166 100644 --- a/commands/avatar-edit/greyscale.js +++ b/commands/avatar-edit/greyscale.js @@ -3,53 +3,53 @@ const { createCanvas, loadImage } = require('canvas'); const snekfetch = require('snekfetch'); module.exports = class GreyscaleCommand extends Command { - constructor(client) { - super(client, { - name: 'greyscale', - aliases: ['grayscale'], - group: 'avatar-edit', - memberName: 'greyscale', - description: 'Draws a user\'s avatar in greyscale.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'greyscale', + aliases: ['grayscale'], + group: 'avatar-edit', + memberName: 'greyscale', + description: 'Draws a user\'s avatar in greyscale.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(256, 256); - const ctx = canvas.getContext('2d'); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(avatar, 0, 0, 256, 256); - const imgData = ctx.getImageData(0, 0, 256, 256); - const { data } = imgData; - for (let i = 0; i < data.length; i += 4) { - const brightness = (0.34 * data[i]) + (0.5 * data[i + 1]) + (0.16 * data[i + 2]); - data[i] = brightness; - data[i + 1] = brightness; - data[i + 2] = brightness; - } - ctx.putImageData(imgData, 0, 0); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'greyscale.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(256, 256); + const ctx = canvas.getContext('2d'); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(avatar, 0, 0, 256, 256); + const imgData = ctx.getImageData(0, 0, 256, 256); + const { data } = imgData; + for (let i = 0; i < data.length; i += 4) { + const brightness = (0.34 * data[i]) + (0.5 * data[i + 1]) + (0.16 * data[i + 2]); + data[i] = brightness; + data[i + 1] = brightness; + data[i + 2] = brightness; + } + ctx.putImageData(imgData, 0, 0); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'greyscale.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/invert.js b/commands/avatar-edit/invert.js index ca736925..9c7827ae 100644 --- a/commands/avatar-edit/invert.js +++ b/commands/avatar-edit/invert.js @@ -3,51 +3,51 @@ const { createCanvas, loadImage } = require('canvas'); const snekfetch = require('snekfetch'); module.exports = class InvertCommand extends Command { - constructor(client) { - super(client, { - name: 'invert', - group: 'avatar-edit', - memberName: 'invert', - description: 'Draws a user\'s avatar inverted.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'invert', + group: 'avatar-edit', + memberName: 'invert', + description: 'Draws a user\'s avatar inverted.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(256, 256); - const ctx = canvas.getContext('2d'); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(avatar, 0, 0, 256, 256); - const imgData = ctx.getImageData(0, 0, 256, 256); - const { data } = imgData; - for (let i = 0; i < data.length; i += 4) { - data[i] = 255 - data[i]; - data[i + 1] = 255 - data[i + 1]; - data[i + 2] = 255 - data[i + 2]; - } - ctx.putImageData(imgData, 0, 0); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'invert.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(256, 256); + const ctx = canvas.getContext('2d'); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(avatar, 0, 0, 256, 256); + const imgData = ctx.getImageData(0, 0, 256, 256); + const { data } = imgData; + for (let i = 0; i < data.length; i += 4) { + data[i] = 255 - data[i]; + data[i + 1] = 255 - data[i + 1]; + data[i + 2] = 255 - data[i + 2]; + } + ctx.putImageData(imgData, 0, 0); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'invert.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/rejected.js b/commands/avatar-edit/rejected.js index 4fa63748..2391ca06 100644 --- a/commands/avatar-edit/rejected.js +++ b/commands/avatar-edit/rejected.js @@ -4,46 +4,46 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class RejctedCommand extends Command { - constructor(client) { - super(client, { - name: 'rejected', - aliases: ['reject'], - group: 'avatar-edit', - memberName: 'rejected', - description: 'Draws a "rejected" stamp over a user\'s avatar.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'rejected', + aliases: ['reject'], + group: 'avatar-edit', + memberName: 'rejected', + description: 'Draws a "rejected" stamp over a user\'s avatar.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(256, 256); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'rejected.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(avatar, 0, 0, 256, 256); - ctx.drawImage(base, 0, 0, 256, 256); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rejected.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(256, 256); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'rejected.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(avatar, 0, 0, 256, 256); + ctx.drawImage(base, 0, 0, 256, 256); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rejected.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/rip.js b/commands/avatar-edit/rip.js index ce653c66..cea418a8 100644 --- a/commands/avatar-edit/rip.js +++ b/commands/avatar-edit/rip.js @@ -4,55 +4,55 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class RIPCommand extends Command { - constructor(client) { - super(client, { - name: 'rip', - aliases: ['grave', 'grave-stone'], - group: 'avatar-edit', - memberName: 'rip', - description: 'Draws a user\'s avatar over a gravestone.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'rip', + aliases: ['grave', 'grave-stone'], + group: 'avatar-edit', + memberName: 'rip', + description: 'Draws a user\'s avatar over a gravestone.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(507, 338); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'rip.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(base, 0, 0); - ctx.drawImage(avatar, 158, 51, 200, 200); - const imgData = ctx.getImageData(158, 51, 200, 200); - const { data } = imgData; - for (let i = 0; i < data.length; i += 4) { - const brightness = (0.34 * data[i]) + (0.5 * data[i + 1]) + (0.16 * data[i + 2]); - data[i] = brightness; - data[i + 1] = brightness; - data[i + 2] = brightness; - } - ctx.putImageData(imgData, 158, 51); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rip.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(507, 338); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'rip.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(base, 0, 0); + ctx.drawImage(avatar, 158, 51, 200, 200); + const imgData = ctx.getImageData(158, 51, 200, 200); + const { data } = imgData; + for (let i = 0; i < data.length; i += 4) { + const brightness = (0.34 * data[i]) + (0.5 * data[i + 1]) + (0.16 * data[i + 2]); + data[i] = brightness; + data[i + 1] = brightness; + data[i + 2] = brightness; + } + ctx.putImageData(imgData, 158, 51); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rip.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/simba.js b/commands/avatar-edit/simba.js index 2947f258..6a4144cd 100644 --- a/commands/avatar-edit/simba.js +++ b/commands/avatar-edit/simba.js @@ -4,47 +4,47 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class SimbaCommand extends Command { - constructor(client) { - super(client, { - name: 'simba', - group: 'avatar-edit', - memberName: 'simba', - description: 'Draws a user\'s avatar over Simba from The Lion King\'s reflection.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'simba', + group: 'avatar-edit', + memberName: 'simba', + description: 'Draws a user\'s avatar over Simba from The Lion King\'s reflection.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(500, 281); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'simba.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(base, 0, 0); - ctx.rotate(-24 * Math.PI / 180); - ctx.drawImage(avatar, 75, 160, 130, 150); - ctx.rotate(24 * Math.PI / 180); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'simba.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(500, 281); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'simba.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(base, 0, 0); + ctx.rotate(-24 * Math.PI / 180); + ctx.drawImage(avatar, 75, 160, 130, 150); + ctx.rotate(24 * Math.PI / 180); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'simba.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/steam-card.js b/commands/avatar-edit/steam-card.js index ad73a243..2303880d 100644 --- a/commands/avatar-edit/steam-card.js +++ b/commands/avatar-edit/steam-card.js @@ -4,50 +4,50 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class SteamCardCommand extends Command { - constructor(client) { - super(client, { - name: 'steam-card', - group: 'avatar-edit', - memberName: 'steam-card', - description: 'Draws a user\'s avatar over a Steam card.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'steam-card', + group: 'avatar-edit', + memberName: 'steam-card', + description: 'Draws a user\'s avatar over a Steam card.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 512 - }); - try { - parseFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'Roboto.ttf'), { family: 'Roboto' }); - const canvas = createCanvas(494, 568); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'steam-card.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.fillStyle = 'white'; - ctx.fillRect(0, 0, 494, 568); - ctx.drawImage(avatar, 25, 25, 450, 450); - ctx.drawImage(base, 0, 0); - ctx.font = '30px Roboto'; - ctx.fillText(user.username, 35, 48); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-card.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 512 + }); + try { + parseFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'Roboto.ttf'), { family: 'Roboto' }); + const canvas = createCanvas(494, 568); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'steam-card.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.fillStyle = 'white'; + ctx.fillRect(0, 0, 494, 568); + ctx.drawImage(avatar, 25, 25, 450, 450); + ctx.drawImage(base, 0, 0); + ctx.font = '30px Roboto'; + ctx.fillText(user.username, 35, 48); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-card.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/thug-life.js b/commands/avatar-edit/thug-life.js index 99718c9d..4c40ca1c 100644 --- a/commands/avatar-edit/thug-life.js +++ b/commands/avatar-edit/thug-life.js @@ -4,54 +4,54 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class ThugLifeCommand extends Command { - constructor(client) { - super(client, { - name: 'thug-life', - group: 'avatar-edit', - memberName: 'thug-life', - description: 'Draws "Thug Life" over a user\'s avatar.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'thug-life', + group: 'avatar-edit', + memberName: 'thug-life', + description: 'Draws "Thug Life" over a user\'s avatar.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 256 - }); - try { - const canvas = createCanvas(256, 256); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'thug-life.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(avatar, 0, 0, 256, 256); - ctx.drawImage(base, 15, 175, 225, 75); - const imgData = ctx.getImageData(0, 0, 256, 256); - const { data } = imgData; - for (let i = 0; i < data.length; i += 4) { - const brightness = (0.34 * data[i]) + (0.5 * data[i + 1]) + (0.16 * data[i + 2]); - data[i] = brightness; - data[i + 1] = brightness; - data[i + 2] = brightness; - } - ctx.putImageData(imgData, 0, 0); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'thug-life.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 256 + }); + try { + const canvas = createCanvas(256, 256); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'thug-life.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(avatar, 0, 0, 256, 256); + ctx.drawImage(base, 15, 175, 225, 75); + const imgData = ctx.getImageData(0, 0, 256, 256); + const { data } = imgData; + for (let i = 0; i < data.length; i += 4) { + const brightness = (0.34 * data[i]) + (0.5 * data[i + 1]) + (0.16 * data[i + 2]); + data[i] = brightness; + data[i + 1] = brightness; + data[i + 2] = brightness; + } + ctx.putImageData(imgData, 0, 0); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'thug-life.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/triggered.js b/commands/avatar-edit/triggered.js index 060f6bf9..937cf3bf 100644 --- a/commands/avatar-edit/triggered.js +++ b/commands/avatar-edit/triggered.js @@ -4,51 +4,51 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class TriggeredCommand extends Command { - constructor(client) { - super(client, { - name: 'triggered', - group: 'avatar-edit', - memberName: 'triggered', - description: 'Draws a user\'s avatar over a Triggered meme.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'triggered', + group: 'avatar-edit', + memberName: 'triggered', + description: 'Draws a user\'s avatar over a Triggered meme.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 512 - }); - try { - const canvas = createCanvas(320, 371); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'triggered.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.fillStyle = 'white'; - ctx.fillRect(0, 0, 320, 371); - ctx.drawImage(avatar, 0, 0, 320, 320); - const imgData = ctx.getImageData(0, 0, 320, 320); - const { data } = imgData; - for (let i = 0; i < data.length; i += 4) data[i] = Math.max(255, data[i]); - ctx.putImageData(imgData, 0, 0); - ctx.drawImage(base, 0, 0); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 512 + }); + try { + const canvas = createCanvas(320, 371); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'triggered.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.fillStyle = 'white'; + ctx.fillRect(0, 0, 320, 371); + ctx.drawImage(avatar, 0, 0, 320, 320); + const imgData = ctx.getImageData(0, 0, 320, 320); + const { data } = imgData; + for (let i = 0; i < data.length; i += 4) data[i] = Math.max(255, data[i]); + ctx.putImageData(imgData, 0, 0); + ctx.drawImage(base, 0, 0); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/avatar-edit/wanted.js b/commands/avatar-edit/wanted.js index b438c3fc..f59e31f5 100644 --- a/commands/avatar-edit/wanted.js +++ b/commands/avatar-edit/wanted.js @@ -4,45 +4,45 @@ const snekfetch = require('snekfetch'); const path = require('path'); module.exports = class WantedCommand extends Command { - constructor(client) { - super(client, { - name: 'wanted', - group: 'avatar-edit', - memberName: 'wanted', - description: 'Draws a user\'s avatar over a wanted poster.', - throttling: { - usages: 1, - duration: 30 - }, - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'user', - prompt: 'Which user would you like to edit the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'wanted', + group: 'avatar-edit', + memberName: 'wanted', + description: 'Draws a user\'s avatar over a wanted poster.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'user', + prompt: 'Which user would you like to edit the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - async run(msg, args) { - const user = args.user || msg.author; - const avatarURL = user.displayAvatarURL({ - format: 'png', - size: 512 - }); - try { - const canvas = createCanvas(741, 1000); - const ctx = canvas.getContext('2d'); - const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'wanted.png')); - const { body } = await snekfetch.get(avatarURL); - const avatar = await loadImage(body); - ctx.drawImage(base, 0, 0); - ctx.drawImage(avatar, 150, 360, 430, 430); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] }); - } catch (err) { - return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const user = args.user || msg.author; + const avatarURL = user.displayAvatarURL({ + format: 'png', + size: 512 + }); + try { + const canvas = createCanvas(741, 1000); + const ctx = canvas.getContext('2d'); + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'wanted.png')); + const { body } = await snekfetch.get(avatarURL); + const avatar = await loadImage(body); + ctx.drawImage(base, 0, 0); + ctx.drawImage(avatar, 150, 360, 430, 430); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] }); + } catch (err) { + return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/games/battle.js b/commands/games/battle.js index 3d89ca01..aad62b84 100644 --- a/commands/games/battle.js +++ b/commands/games/battle.js @@ -2,123 +2,123 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class BattleCommand extends Command { - constructor(client) { - super(client, { - name: 'battle', - aliases: ['fight', 'death-battle'], - group: 'games', - memberName: 'battle', - description: 'Engage in a turn-based battle against another user or the AI.', - guildOnly: true, - args: [ - { - key: 'opponent', - prompt: 'Who would you like to battle?', - type: 'user', - default: 'AI' - } - ] - }); + constructor(client) { + super(client, { + name: 'battle', + aliases: ['fight', 'death-battle'], + group: 'games', + memberName: 'battle', + description: 'Engage in a turn-based battle against another user or the AI.', + guildOnly: true, + args: [ + { + key: 'opponent', + prompt: 'Who would you like to battle?', + type: 'user', + default: 'AI' + } + ] + }); - this.fighting = new Set(); - } + this.fighting = new Set(); + } - async run(msg, args) { // eslint-disable-line complexity - const { opponent } = args; - if (opponent.bot) return msg.say('Bots may not be fought.'); - if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.'); - if (this.fighting.has(msg.guild.id)) return msg.say('Only one fight may be occurring per server.'); - this.fighting.add(msg.guild.id); - try { - if (opponent !== 'AI') { - await msg.say(`${opponent}, do you accept this challenge? **__Y__es** or **No**?`); - const verify = await msg.channel.awaitMessages((res) => res.author.id === opponent.id, { - max: 1, - time: 30000 - }); - if (!verify.size || !['yes', 'y'].includes(verify.first().content.toLowerCase())) { - this.fighting.delete(msg.guild.id); - return msg.say('Looks like they declined...'); - } - } - let userHP = 500; - let oppoHP = 500; - let userTurn = false; - let guard = false; - const reset = (changeGuard = true) => { - if (userTurn) userTurn = false; - else userTurn = true; - if (changeGuard && guard) guard = false; - }; - const dealDamage = (damage) => { - if (userTurn) oppoHP -= damage; - else userHP -= damage; - }; - const forfeit = () => { - if (userTurn) userHP = 0; - else oppoHP = 0; - }; - while (userHP > 0 && oppoHP > 0) { // eslint-disable-line no-unmodified-loop-condition - const user = userTurn ? msg.author : opponent; - let choice; - if (opponent !== 'AI' || (opponent === 'AI' && userTurn)) { - const id = userTurn ? msg.author.id : opponent.id; - await msg.say(stripIndents` - ${user}, do you **fight**, **guard**, **special**, or **run**? - **${msg.author.username}**: ${userHP}HP - **${opponent === 'AI' ? 'AI' : opponent.username}**: ${oppoHP}HP - `); - const turn = await msg.channel.awaitMessages((res) => res.author.id === id, { - max: 1, - time: 30000 - }); - if (!turn.size) { - await msg.say('Time!'); - forfeit(); - break; - } - choice = turn.first().content.toLowerCase(); - } else { - const choices = ['fight', 'guard', 'special']; - choice = choices[Math.floor(Math.random() * choices.length)]; - } - if (choice === 'fight') { - const damage = Math.floor(Math.random() * (guard ? 10 : 100)) + 1; - await msg.say(`${user} deals **${damage}** damage!`); - dealDamage(damage); - reset(); - } else if (choice === 'guard') { - await msg.say(`${user} guards!`); - guard = true; - reset(false); - } else if (choice === 'special') { - const hit = Math.floor(Math.random() * 4) + 1; - if (hit === 1) { - const damage = Math.floor(Math.random() * ((guard ? 300 : 150) - 100 + 1) + 100); - await msg.say(`${user} deals **${damage}** damage!`); - dealDamage(damage); - reset(); - } else { - await msg.say(`${user}'s attack missed!`); - reset(); - } - } else if (choice === 'run') { - await msg.say(`${user} flees!`); - forfeit(); - break; - } else { - await msg.say(`${user}, I do not understand what you want to do.`); - } - } - this.fighting.delete(msg.guild.id); - return msg.say(stripIndents` - The match is over! - **Winner:** ${userHP > oppoHP ? `${msg.author} (${userHP}HP)` : `${opponent} (${oppoHP}HP)`} - **Loser:** ${userHP > oppoHP ? `${opponent} (${oppoHP}HP)` : `${msg.author} (${userHP}HP)`} - `); - } catch (err) { - this.fighting.delete(msg.guild.id); - return msg.say(`Oh no, an Error occurred: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { // eslint-disable-line complexity + const { opponent } = args; + if (opponent.bot) return msg.say('Bots may not be fought.'); + if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.'); + if (this.fighting.has(msg.guild.id)) return msg.say('Only one fight may be occurring per server.'); + this.fighting.add(msg.guild.id); + try { + if (opponent !== 'AI') { + await msg.say(`${opponent}, do you accept this challenge? **__Y__es** or **No**?`); + const verify = await msg.channel.awaitMessages(res => res.author.id === opponent.id, { + max: 1, + time: 30000 + }); + if (!verify.size || !['yes', 'y'].includes(verify.first().content.toLowerCase())) { + this.fighting.delete(msg.guild.id); + return msg.say('Looks like they declined...'); + } + } + let userHP = 500; + let oppoHP = 500; + let userTurn = false; + let guard = false; + const reset = (changeGuard = true) => { + if (userTurn) userTurn = false; + else userTurn = true; + if (changeGuard && guard) guard = false; + }; + const dealDamage = damage => { + if (userTurn) oppoHP -= damage; + else userHP -= damage; + }; + const forfeit = () => { + if (userTurn) userHP = 0; + else oppoHP = 0; + }; + while (userHP > 0 && oppoHP > 0) { // eslint-disable-line no-unmodified-loop-condition + const user = userTurn ? msg.author : opponent; + let choice; + if (opponent !== 'AI' || (opponent === 'AI' && userTurn)) { + const id = userTurn ? msg.author.id : opponent.id; + await msg.say(stripIndents` + ${user}, do you **fight**, **guard**, **special**, or **run**? + **${msg.author.username}**: ${userHP}HP + **${opponent === 'AI' ? 'AI' : opponent.username}**: ${oppoHP}HP + `); + const turn = await msg.channel.awaitMessages(res => res.author.id === id, { + max: 1, + time: 30000 + }); + if (!turn.size) { + await msg.say('Time!'); + forfeit(); + break; + } + choice = turn.first().content.toLowerCase(); + } else { + const choices = ['fight', 'guard', 'special']; + choice = choices[Math.floor(Math.random() * choices.length)]; + } + if (choice === 'fight') { + const damage = Math.floor(Math.random() * (guard ? 10 : 100)) + 1; + await msg.say(`${user} deals **${damage}** damage!`); + dealDamage(damage); + reset(); + } else if (choice === 'guard') { + await msg.say(`${user} guards!`); + guard = true; + reset(false); + } else if (choice === 'special') { + const hit = Math.floor(Math.random() * 4) + 1; + if (hit === 1) { + const damage = Math.floor((Math.random() * ((guard ? 300 : 150) - (100 + 1))) + 100); + await msg.say(`${user} deals **${damage}** damage!`); + dealDamage(damage); + reset(); + } else { + await msg.say(`${user}'s attack missed!`); + reset(); + } + } else if (choice === 'run') { + await msg.say(`${user} flees!`); + forfeit(); + break; + } else { + await msg.say(`${user}, I do not understand what you want to do.`); + } + } + this.fighting.delete(msg.guild.id); + return msg.say(stripIndents` + The match is over! + **Winner:** ${userHP > oppoHP ? `${msg.author} (${userHP}HP)` : `${opponent} (${oppoHP}HP)`} + **Loser:** ${userHP > oppoHP ? `${opponent} (${oppoHP}HP)` : `${msg.author} (${userHP}HP)`} + `); + } catch (err) { + this.fighting.delete(msg.guild.id); + return msg.say(`Oh no, an Error occurred: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/games/fishy.js b/commands/games/fishy.js index 1a31b029..8fc532f6 100644 --- a/commands/games/fishy.js +++ b/commands/games/fishy.js @@ -2,17 +2,17 @@ const Command = require('../../structures/Command'); const fishes = [':fish:', ':tropical_fish:', ':blowfish:', ':wrench:']; module.exports = class FishyCommand extends Command { - constructor(client) { - super(client, { - name: 'fishy', - group: 'games', - memberName: 'fishy', - description: 'Catches a fish.' - }); - } + constructor(client) { + super(client, { + name: 'fishy', + group: 'games', + memberName: 'fishy', + description: 'Catches a fish.' + }); + } - run(msg) { - const fish = fishes[Math.floor(Math.random() * fishes.length)]; - return msg.say(`You caught a: ${fish}`); - } + run(msg) { + const fish = fishes[Math.floor(Math.random() * fishes.length)]; + return msg.say(`You caught a: ${fish}`); + } }; diff --git a/commands/games/gunfight.js b/commands/games/gunfight.js index c4f5f95c..89963f7e 100644 --- a/commands/games/gunfight.js +++ b/commands/games/gunfight.js @@ -2,60 +2,60 @@ const Command = require('../../structures/Command'); const words = ['fire', 'draw', 'shoot', 'bang', 'pull']; module.exports = class GunfightCommand extends Command { - constructor(client) { - super(client, { - name: 'gunfight', - aliases: ['western-gunfight'], - group: 'games', - memberName: 'gunfight', - description: 'Engage in a western gunfight against another user.', - guildOnly: true, - args: [ - { - key: 'opponent', - prompt: 'Who would you like to gunfight?', - type: 'user' - } - ] - }); + constructor(client) { + super(client, { + name: 'gunfight', + aliases: ['western-gunfight'], + group: 'games', + memberName: 'gunfight', + description: 'Engage in a western gunfight against another user.', + guildOnly: true, + args: [ + { + key: 'opponent', + prompt: 'Who would you like to gunfight?', + type: 'user' + } + ] + }); - this.fighting = new Set(); - } + this.fighting = new Set(); + } - async run(msg, args) { - const { opponent } = args; - if (opponent.bot) return msg.say('Bots may not be fought.'); - if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.'); - if (this.fighting.has(msg.guild.id)) return msg.say('Only one fight may be occurring per server.'); - this.fighting.add(msg.guild.id); - try { - await msg.say(`${opponent}, do you accept this challenge? **__Y__es** or **No**?`); - const verify = await msg.channel.awaitMessages((res) => res.author.id === opponent.id, { - max: 1, - time: 30000 - }); - if (!verify.size || !['yes', 'y'].includes(verify.first().content.toLowerCase())) { - this.fighting.delete(msg.guild.id); - return msg.say('Looks like they declined...'); - } - await msg.say('Get Ready...'); - const length = Math.floor(Math.random() * (30000 - 1000 + 1) + 1000); - this.client.setTimeout(async () => { - const word = words[Math.floor(Math.random() * words.length)]; - await msg.say(`TYPE \`${word.toUpperCase()}\` NOW!`); - const filter = (res) => [opponent.id, msg.author.id].includes(res.author.id) && res.content.toLowerCase() === word; // eslint-disable-line max-len - const winner = await msg.channel.awaitMessages(filter, { - max: 1, - time: 30000 - }); - this.fighting.delete(msg.guild.id); - if (!winner.size) return msg.say('Oh... No one won.'); - else return msg.say(`And the winner is ${winner.first().author.username}!`); - }, length); - return null; - } catch (err) { - this.fighting.delete(msg.guild.id); - return msg.say(`Oh no, an Error occurred: \`${err.message}\`. Try again later!`); - } - } + async run(msg, args) { + const { opponent } = args; + if (opponent.bot) return msg.say('Bots may not be fought.'); + if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.'); + if (this.fighting.has(msg.guild.id)) return msg.say('Only one fight may be occurring per server.'); + this.fighting.add(msg.guild.id); + try { + await msg.say(`${opponent}, do you accept this challenge? **__Y__es** or **No**?`); + const verify = await msg.channel.awaitMessages(res => res.author.id === opponent.id, { + max: 1, + time: 30000 + }); + if (!verify.size || !['yes', 'y'].includes(verify.first().content.toLowerCase())) { + this.fighting.delete(msg.guild.id); + return msg.say('Looks like they declined...'); + } + await msg.say('Get Ready...'); + const length = Math.floor((Math.random() * ((30000 - 1000) + 1)) + 1000); + this.client.setTimeout(async () => { + const word = words[Math.floor(Math.random() * words.length)]; + await msg.say(`TYPE \`${word.toUpperCase()}\` NOW!`); + const filter = res => [opponent.id, msg.author.id].includes(res.author.id) && res.content.toLowerCase() === word; // eslint-disable-line max-len + const winner = await msg.channel.awaitMessages(filter, { + max: 1, + time: 30000 + }); + this.fighting.delete(msg.guild.id); + if (!winner.size) return msg.say('Oh... No one won.'); + return msg.say(`And the winner is ${winner.first().author.username}!`); + }, length); + return null; + } catch (err) { + this.fighting.delete(msg.guild.id); + return msg.say(`Oh no, an Error occurred: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/games/hangman.js b/commands/games/hangman.js index 5152b2b0..2d3ac382 100644 --- a/commands/games/hangman.js +++ b/commands/games/hangman.js @@ -4,80 +4,80 @@ const { stripIndents } = require('common-tags'); const { wordnikKey } = require('../../config'); module.exports = class HangmanCommand extends Command { - constructor(client) { - super(client, { - name: 'hangman', - group: 'games', - memberName: 'hangman', - description: 'Play a game of hangman.', - guildOnly: true - }); + constructor(client) { + super(client, { + name: 'hangman', + group: 'games', + memberName: 'hangman', + description: 'Play a game of hangman.', + guildOnly: true + }); - this.playing = new Set(); - } + this.playing = new Set(); + } - async run(msg) { - if (this.playing.has(msg.guild.id)) return msg.say('Only one game may be occurring per server.'); - this.playing.add(msg.guild.id); - try { - const { body } = await snekfetch - .get('http://api.wordnik.com:80/v4/words.json/randomWord') - .query({ - hasDictionaryDef: true, - minCorpusCount: 0, - maxCorpusCount: -1, - minDictionaryCount: 1, - maxDictionaryCount: -1, - minLength: -1, - maxLength: -1, - api_key: wordnikKey - }); - const word = body.word.toLowerCase().replace(/[ ]/g, '-'); - let points = 0; - const confirmation = []; - const incorrect = []; - const display = '_'.repeat(word.length).split(''); - while (word.length !== confirmation.length && points < 7) { - await msg.code(null, stripIndents` - ___________ - | | - | ${points > 0 ? 'O' : ''} - | ${points > 2 ? '—' : ' '}${points > 1 ? '|' : ''}${points > 3 ? '—' : ''} - | ${points > 4 ? '/' : ''} ${points > 5 ? '\\' : ''} - =========== - The word is: ${display.join(' ')}. Which letter do you choose? - `); - const guess = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 30000 - }); - if (!guess.size) { - await msg.say('Time!'); - break; - } - const choice = guess.first().content.toLowerCase(); - if (confirmation.includes(choice) || incorrect.includes(choice)) { - await msg.say('You have already picked that letter!'); - } else if (word.includes(choice)) { - await msg.say('Nice job!'); - for (let i = 0; i < word.length; i++) { - if (word[i] === choice) { - confirmation.push(word[i]); - display[i] = word[i]; - } - } - } else { - await msg.say('Nope!'); - incorrect.push(choice); - points++; - } - } - this.playing.delete(msg.guild.id); - if (word.length === confirmation.length) return msg.say(`You won, it was ${word}!`); - else return msg.say(`Too bad... It was ${word}...`); - } catch (err) { - this.playing.delete(msg.guild.id); - return msg.say(`Oh no, an Error occurred: \`${err.message}\`. Try again later!`); - } - } + async run(msg) { + if (this.playing.has(msg.guild.id)) return msg.say('Only one game may be occurring per server.'); + this.playing.add(msg.guild.id); + try { + const { body } = await snekfetch + .get('http://api.wordnik.com:80/v4/words.json/randomWord') + .query({ + hasDictionaryDef: true, + minCorpusCount: 0, + maxCorpusCount: -1, + minDictionaryCount: 1, + maxDictionaryCount: -1, + minLength: -1, + maxLength: -1, + api_key: wordnikKey + }); + const word = body.word.toLowerCase().replace(/[ ]/g, '-'); + let points = 0; + const confirmation = []; + const incorrect = []; + const display = '_'.repeat(word.length).split(''); + while (word.length !== confirmation.length && points < 7) { + await msg.code(null, stripIndents` + ___________ + | | + | ${points > 0 ? 'O' : ''} + | ${points > 2 ? '—' : ' '}${points > 1 ? '|' : ''}${points > 3 ? '—' : ''} + | ${points > 4 ? '/' : ''} ${points > 5 ? '\\' : ''} + =========== + The word is: ${display.join(' ')}. Which letter do you choose? + `); + const guess = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 30000 + }); + if (!guess.size) { + await msg.say('Time!'); + break; + } + const choice = guess.first().content.toLowerCase(); + if (confirmation.includes(choice) || incorrect.includes(choice)) { + await msg.say('You have already picked that letter!'); + } else if (word.includes(choice)) { + await msg.say('Nice job!'); + for (let i = 0; i < word.length; i++) { + if (word[i] === choice) { // eslint-disable-line max-depth + confirmation.push(word[i]); + display[i] = word[i]; + } + } + } else { + await msg.say('Nope!'); + incorrect.push(choice); + points++; + } + } + this.playing.delete(msg.guild.id); + if (word.length === confirmation.length) return msg.say(`You won, it was ${word}!`); + return msg.say(`Too bad... It was ${word}...`); + } catch (err) { + this.playing.delete(msg.guild.id); + return msg.say(`Oh no, an Error occurred: \`${err.message}\`. Try again later!`); + } + } }; diff --git a/commands/games/lottery.js b/commands/games/lottery.js index 717af31f..9d5e3824 100644 --- a/commands/games/lottery.js +++ b/commands/games/lottery.js @@ -1,18 +1,18 @@ const Command = require('../../structures/Command'); module.exports = class LotteryCommand extends Command { - constructor(client) { - super(client, { - name: 'lottery', - group: 'games', - memberName: 'lottery', - description: 'Attempt to win the lottery, with a 1 in 100 chance of winning.' - }); - } + constructor(client) { + super(client, { + name: 'lottery', + group: 'games', + memberName: 'lottery', + description: 'Attempt to win the lottery, with a 1 in 100 chance of winning.' + }); + } - run(msg) { - const lottery = Math.floor(Math.random() * 100) + 1; - if (lottery === 1) return msg.reply(`Wow! You actually won! Great job!`); - else return msg.reply(`Nope, sorry, you lost.`); - } + run(msg) { + const lottery = Math.floor(Math.random() * 100) + 1; + if (lottery === 1) return msg.reply(`Wow! You actually won! Great job!`); + return msg.reply(`Nope, sorry, you lost.`); + } }; diff --git a/commands/games/math-game.js b/commands/games/math-game.js index f8b83208..0c99593b 100644 --- a/commands/games/math-game.js +++ b/commands/games/math-game.js @@ -4,45 +4,45 @@ const math = require('mathjs'); const { operations, difficulties, maxValues } = require('../../assets/json/math-game'); module.exports = class MathGameCommand extends Command { - constructor(client) { - super(client, { - name: 'math-game', - group: 'games', - memberName: 'math-game', - description: 'See how fast you can answer a math problem in a given time limit.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'difficulty', - prompt: `What should the difficulty of the game be? One of: ${difficulties.join(', ')}`, - type: 'string', - validate: (difficulty) => { - if (difficulties.includes(difficulty.toLowerCase())) return true; - else return `The difficulty must be one of: ${difficulties.join(', ')}`; - }, - parse: (difficulty) => difficulty.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'math-game', + group: 'games', + memberName: 'math-game', + description: 'See how fast you can answer a math problem in a given time limit.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'difficulty', + prompt: `What should the difficulty of the game be? One of: ${difficulties.join(', ')}`, + type: 'string', + validate: difficulty => { + if (difficulties.includes(difficulty.toLowerCase())) return true; + return `The difficulty must be one of: ${difficulties.join(', ')}`; + }, + parse: difficulty => difficulty.toLowerCase() + } + ] + }); + } - async run(msg, args) { - const { difficulty } = args; - const operation = operations[Math.floor(Math.random() * operations.length)]; - const value1 = Math.floor(Math.random() * maxValues[difficulty]) + 1; - const value2 = Math.floor(Math.random() * maxValues[difficulty]) + 1; - const expression = `${value1} ${operation} ${value2}`; - const answer = math.eval(expression).toString(); - const embed = new MessageEmbed() - .setTitle('You have 10 seconds to answer:') - .setDescription(expression); - await msg.embed(embed); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 10000 - }); - if (!msgs.size) return msg.say(`Time! It was ${answer}, sorry!`); - if (msgs.first().content !== answer) return msg.say(`Nope, sorry, it's ${answer}.`); - else return msg.say('Nice job! 10/10! You deserve some cake!'); - } + async run(msg, args) { + const { difficulty } = args; + const operation = operations[Math.floor(Math.random() * operations.length)]; + const value1 = Math.floor(Math.random() * maxValues[difficulty]) + 1; + const value2 = Math.floor(Math.random() * maxValues[difficulty]) + 1; + const expression = `${value1} ${operation} ${value2}`; + const answer = math.eval(expression).toString(); + const embed = new MessageEmbed() + .setTitle('You have 10 seconds to answer:') + .setDescription(expression); + await msg.embed(embed); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 10000 + }); + if (!msgs.size) return msg.say(`Time! It was ${answer}, sorry!`); + if (msgs.first().content !== answer) return msg.say(`Nope, sorry, it's ${answer}.`); + return msg.say('Nice job! 10/10! You deserve some cake!'); + } }; diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 3df92d69..2bf924a7 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -4,39 +4,39 @@ const { stripIndents } = require('common-tags'); const snekfetch = require('snekfetch'); module.exports = class QuizCommand extends Command { - constructor(client) { - super(client, { - name: 'quiz', - aliases: ['jeopardy'], - group: 'games', - memberName: 'quiz', - description: 'Answer a true/false quiz question.', - clientPermissions: ['EMBED_LINKS'] - }); - } + constructor(client) { + super(client, { + name: 'quiz', + aliases: ['jeopardy'], + group: 'games', + memberName: 'quiz', + description: 'Answer a true/false quiz question.', + clientPermissions: ['EMBED_LINKS'] + }); + } - async run(msg) { - const { body } = await snekfetch - .get('https://opentdb.com/api.php') - .query({ - amount: 1, - type: 'boolean', - encode: 'url3986' - }); - const answer = body.results[0].correct_answer.toLowerCase(); - const embed = new MessageEmbed() - .setTitle('You have 15 seconds to answer this question:') - .setDescription(stripIndents` - **${decodeURIComponent(body.results[0].category)}** - True or False: ${decodeURIComponent(body.results[0].question)} - `); - await msg.embed(embed); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 15000 - }); - if (!msgs.size) return msg.say(`Time! It was ${answer}, sorry!`); - if (msgs.first().content.toLowerCase() !== answer) return msg.say(`Nope, sorry, it's ${answer}.`); - else return msg.say('Nice job! 10/10! You deserve some cake!'); - } + async run(msg) { + const { body } = await snekfetch + .get('https://opentdb.com/api.php') + .query({ + amount: 1, + type: 'boolean', + encode: 'url3986' + }); + const answer = body.results[0].correct_answer.toLowerCase(); + const embed = new MessageEmbed() + .setTitle('You have 15 seconds to answer this question:') + .setDescription(stripIndents` + **${decodeURIComponent(body.results[0].category)}** + True or False: ${decodeURIComponent(body.results[0].question)} + `); + await msg.embed(embed); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 15000 + }); + if (!msgs.size) return msg.say(`Time! It was ${answer}, sorry!`); + if (msgs.first().content.toLowerCase() !== answer) return msg.say(`Nope, sorry, it's ${answer}.`); + return msg.say('Nice job! 10/10! You deserve some cake!'); + } }; diff --git a/commands/games/rock-paper-scissors.js b/commands/games/rock-paper-scissors.js index 3b15df59..34399e9f 100644 --- a/commands/games/rock-paper-scissors.js +++ b/commands/games/rock-paper-scissors.js @@ -2,41 +2,41 @@ const Command = require('../../structures/Command'); const choices = ['paper', 'rock', 'scissors']; module.exports = class RockPaperScissorsCommand extends Command { - constructor(client) { - super(client, { - name: 'rock-paper-scissors', - aliases: ['rps'], - group: 'games', - memberName: 'rock-paper-scissors', - description: 'Play Rock-Paper-Scissors.', - args: [ - { - key: 'choice', - prompt: 'Rock, Paper, or Scissors?', - type: 'string', - parse: (choice) => choice.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'rock-paper-scissors', + aliases: ['rps'], + group: 'games', + memberName: 'rock-paper-scissors', + description: 'Play Rock-Paper-Scissors.', + args: [ + { + key: 'choice', + prompt: 'Rock, Paper, or Scissors?', + type: 'string', + parse: choice => choice.toLowerCase() + } + ] + }); + } - run(msg, args) { // eslint-disable-line consistent-return - const { choice } = args; - const response = choices[Math.floor(Math.random() * choices.length)]; - if (choice === 'rock') { - if (response === 'rock') return msg.say('Rock! Aw... A tie...'); - else if (response === 'paper') return msg.say('Paper! Yes! I win!'); - else if (response === 'scissors') return msg.say('Scissors! Aw... I lose...'); - } else if (choice === 'paper') { - if (response === 'rock') return msg.say('Rock! Aw... I lose...'); - else if (response === 'paper') return msg.say('Paper! Aw... A tie...'); - else if (response === 'scissors') return msg.say('Scissors! Yes! I win!'); - } else if (choice === 'scissors') { - if (response === 'rock') return msg.say('Rock! Yes! I win!'); - else if (response === 'paper') return msg.say('Paper! Aw... I lose...'); - else if (response === 'scissors') return msg.say('Scissors! Aw... A tie...'); - } else { - return msg.say('I win by default, you little cheater.'); - } - } + run(msg, args) { // eslint-disable-line consistent-return + const { choice } = args; + const response = choices[Math.floor(Math.random() * choices.length)]; + if (choice === 'rock') { + if (response === 'rock') return msg.say('Rock! Aw... A tie...'); + else if (response === 'paper') return msg.say('Paper! Yes! I win!'); + else if (response === 'scissors') return msg.say('Scissors! Aw... I lose...'); + } else if (choice === 'paper') { + if (response === 'rock') return msg.say('Rock! Aw... I lose...'); + else if (response === 'paper') return msg.say('Paper! Aw... A tie...'); + else if (response === 'scissors') return msg.say('Scissors! Yes! I win!'); + } else if (choice === 'scissors') { + if (response === 'rock') return msg.say('Rock! Yes! I win!'); + else if (response === 'paper') return msg.say('Paper! Aw... I lose...'); + else if (response === 'scissors') return msg.say('Scissors! Aw... A tie...'); + } else { + return msg.say('I win by default, you little cheater.'); + } + } }; diff --git a/commands/games/slots.js b/commands/games/slots.js index ab9c2bf0..db24a97d 100644 --- a/commands/games/slots.js +++ b/commands/games/slots.js @@ -3,29 +3,29 @@ const { stripIndents } = require('common-tags'); const slots = [':grapes:', ':tangerine:', ':pear:', ':cherries:', ':lemon:']; module.exports = class SlotsCommand extends Command { - constructor(client) { - super(client, { - name: 'slots', - group: 'games', - memberName: 'slots', - description: 'Play a game of slots.' - }); - } + constructor(client) { + super(client, { + name: 'slots', + group: 'games', + memberName: 'slots', + description: 'Play a game of slots.' + }); + } - run(msg) { - const slotOne = slots[Math.floor(Math.random() * slots.length)]; - const slotTwo = slots[Math.floor(Math.random() * slots.length)]; - const slotThree = slots[Math.floor(Math.random() * slots.length)]; - if (slotOne === slotTwo && slotOne === slotThree) { - return msg.say(stripIndents` - ${slotOne}|${slotTwo}|${slotThree} - Wow! You won! Great job... er... luck! - `); - } else { - return msg.say(stripIndents` - ${slotOne}|${slotTwo}|${slotThree} - Aww... You lost... Guess it's just bad luck, huh? - `); - } - } + run(msg) { + const slotOne = slots[Math.floor(Math.random() * slots.length)]; + const slotTwo = slots[Math.floor(Math.random() * slots.length)]; + const slotThree = slots[Math.floor(Math.random() * slots.length)]; + if (slotOne === slotTwo && slotOne === slotThree) { + return msg.say(stripIndents` + ${slotOne}|${slotTwo}|${slotThree} + Wow! You won! Great job... er... luck! + `); + } else { + return msg.say(stripIndents` + ${slotOne}|${slotTwo}|${slotThree} + Aww... You lost... Guess it's just bad luck, huh? + `); + } + } }; diff --git a/commands/games/typing-game.js b/commands/games/typing-game.js index d06963b1..857ad883 100644 --- a/commands/games/typing-game.js +++ b/commands/games/typing-game.js @@ -3,41 +3,41 @@ const { MessageEmbed } = require('discord.js'); const { sentences, difficulties, times } = require('../../assets/json/typing-game'); module.exports = class TypingGameCommand extends Command { - constructor(client) { - super(client, { - name: 'typing-game', - group: 'games', - memberName: 'typing-game', - description: 'See how fast you can type a sentence in a given time limit.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'difficulty', - prompt: `What should the difficulty of the game be? One of: ${difficulties.join(', ')}`, - type: 'string', - validate: (difficulty) => { - if (difficulties.includes(difficulty.toLowerCase())) return true; - else return `The difficulty must be one of: ${difficulties.join(', ')}`; - }, - parse: (difficulty) => difficulty.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'typing-game', + group: 'games', + memberName: 'typing-game', + description: 'See how fast you can type a sentence in a given time limit.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'difficulty', + prompt: `What should the difficulty of the game be? One of: ${difficulties.join(', ')}`, + type: 'string', + validate: difficulty => { + if (difficulties.includes(difficulty.toLowerCase())) return true; + return `The difficulty must be one of: ${difficulties.join(', ')}`; + }, + parse: difficulty => difficulty.toLowerCase() + } + ] + }); + } - async run(msg, args) { - const { difficulty } = args; - const sentence = sentences[Math.floor(Math.random() * sentences.length)]; - const time = times[difficulty]; - const embed = new MessageEmbed() - .setTitle(`You have ${time / 1000} seconds to type:`) - .setDescription(sentence); - await msg.embed(embed); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time - }); - if (!msgs.size || msgs.first().content !== sentence) return msg.say('Sorry! You lose!'); - else return msg.say('Nice job! 10/10! You deserve some cake!'); - } + async run(msg, args) { + const { difficulty } = args; + const sentence = sentences[Math.floor(Math.random() * sentences.length)]; + const time = times[difficulty]; + const embed = new MessageEmbed() + .setTitle(`You have ${time / 1000} seconds to type:`) + .setDescription(sentence); + await msg.embed(embed); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time + }); + if (!msgs.size || msgs.first().content !== sentence) return msg.say('Sorry! You lose!'); + return msg.say('Nice job! 10/10! You deserve some cake!'); + } }; diff --git a/commands/guild-info/emoji.js b/commands/guild-info/emoji.js index 19a09ddc..7f9b2f9a 100644 --- a/commands/guild-info/emoji.js +++ b/commands/guild-info/emoji.js @@ -1,19 +1,19 @@ const Command = require('../../structures/Command'); module.exports = class EmojiCommand extends Command { - constructor(client) { - super(client, { - name: 'emoji', - group: 'guild-info', - memberName: 'emoji', - description: 'Responds with a list of the server\'s custom emoji.', - guildOnly: true - }); - } + constructor(client) { + super(client, { + name: 'emoji', + group: 'guild-info', + memberName: 'emoji', + description: 'Responds with a list of the server\'s custom emoji.', + guildOnly: true + }); + } - run(msg) { - const emoji = msg.guild.emojis; - if (!emoji.size) return msg.say('You have no custom emoji.'); - return msg.say(emoji.map((e) => e).join('')); - } + run(msg) { + const emoji = msg.guild.emojis; + if (!emoji.size) return msg.say('You have no custom emoji.'); + return msg.say(emoji.map(e => e).join('')); + } }; diff --git a/commands/guild-info/role-info.js b/commands/guild-info/role-info.js index 66ee0bf5..51c39cd0 100644 --- a/commands/guild-info/role-info.js +++ b/commands/guild-info/role-info.js @@ -4,43 +4,46 @@ const moment = require('moment'); const perms = require('../../assets/json/permissions'); module.exports = class RoleInfoCommand extends Command { - constructor(client) { - super(client, { - name: 'role-info', - aliases: ['role'], - group: 'guild-info', - memberName: 'role-info', - description: 'Responds with detailed information on a role.', - guildOnly: true, - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'role', - prompt: 'Which role would you like to get info on?', - type: 'role' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'role-info', + aliases: ['role'], + group: 'guild-info', + memberName: 'role-info', + description: 'Responds with detailed information on a role.', + guildOnly: true, + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'role', + prompt: 'Which role would you like to get info on?', + type: 'role' + } + ] + }); + } - run(msg, args) { - const { role } = args; - const embed = new MessageEmbed() - .setColor(role.hexColor) - .addField('❯ Name', - role.name, true) - .addField('❯ ID', - role.id, true) - .addField('❯ Color', - role.hexColor.toUpperCase(), true) - .addField('❯ Creation Date', - moment(role.createdAt).format('MMMM Do YYYY'), true) - .addField('❯ Hoisted', - role.hoist ? 'Yes' : 'No', true) - .addField('❯ Mentionable', - role.mentionable ? 'Yes' : 'No', true) - .addField('❯ Permissions', - Object.keys(perms).filter((perm) => role.serialize()[perm]).map((perm) => perms[perm]).join(', ')); - return msg.embed(embed); - } + run(msg, args) { + const { role } = args; + const embed = new MessageEmbed() + .setColor(role.hexColor) + .addField('❯ Name', + role.name, true) + .addField('❯ ID', + role.id, true) + .addField('❯ Color', + role.hexColor.toUpperCase(), true) + .addField('❯ Creation Date', + moment(role.createdAt).format('MMMM Do YYYY'), true) + .addField('❯ Hoisted', + role.hoist ? 'Yes' : 'No', true) + .addField('❯ Mentionable', + role.mentionable ? 'Yes' : 'No', true) + .addField('❯ Permissions', + Object.keys(perms) + .filter(perm => role.serialize()[perm]) + .map(perm => perms[perm]) + .join(', ')); + return msg.embed(embed); + } }; diff --git a/commands/guild-info/server-info.js b/commands/guild-info/server-info.js index b4639c80..b2d29ce4 100644 --- a/commands/guild-info/server-info.js +++ b/commands/guild-info/server-info.js @@ -4,38 +4,38 @@ const moment = require('moment'); const filterLevels = ['Off', 'No Role', 'Everyone']; module.exports = class GuildInfoCommand extends Command { - constructor(client) { - super(client, { - name: 'server-info', - aliases: ['guild', 'server', 'guild-info'], - group: 'guild-info', - memberName: 'server-info', - description: 'Responds with detailed information on the server.', - guildOnly: true, - clientPermissions: ['EMBED_LINKS'] - }); - } + constructor(client) { + super(client, { + name: 'server-info', + aliases: ['guild', 'server', 'guild-info'], + group: 'guild-info', + memberName: 'server-info', + description: 'Responds with detailed information on the server.', + guildOnly: true, + clientPermissions: ['EMBED_LINKS'] + }); + } - run(msg) { - const embed = new MessageEmbed() - .setColor(0x00AE86) - .setThumbnail(msg.guild.iconURL()) - .addField('❯ Name', - msg.guild.name, true) - .addField('❯ ID', - msg.guild.id, true) - .addField('❯ Creation Date', - moment(msg.guild.createdAt).format('MMMM Do YYYY'), true) - .addField('❯ Default Channel', - msg.guild.defaultChannel, true) - .addField('❯ Region', - msg.guild.region, true) - .addField('❯ Explicit Filter', - filterLevels[msg.guild.explicitContentFilter], true) - .addField('❯ Owner', - msg.guild.owner ? msg.guild.owner.user.username : 'None', true) - .addField('❯ Members', - msg.guild.memberCount, true); - return msg.embed(embed); - } + run(msg) { + const embed = new MessageEmbed() + .setColor(0x00AE86) + .setThumbnail(msg.guild.iconURL()) + .addField('❯ Name', + msg.guild.name, true) + .addField('❯ ID', + msg.guild.id, true) + .addField('❯ Creation Date', + moment(msg.guild.createdAt).format('MMMM Do YYYY'), true) + .addField('❯ Default Channel', + msg.guild.defaultChannel, true) + .addField('❯ Region', + msg.guild.region, true) + .addField('❯ Explicit Filter', + filterLevels[msg.guild.explicitContentFilter], true) + .addField('❯ Owner', + msg.guild.owner ? msg.guild.owner.user.username : 'None', true) + .addField('❯ Members', + msg.guild.memberCount, true); + return msg.embed(embed); + } }; diff --git a/commands/image-edit/achievement.js b/commands/image-edit/achievement.js index 84bd3819..19a22d14 100644 --- a/commands/image-edit/achievement.js +++ b/commands/image-edit/achievement.js @@ -2,37 +2,37 @@ const Command = require('../../structures/Command'); const snekfetch = require('snekfetch'); module.exports = class AchievementCommand extends Command { - constructor(client) { - super(client, { - name: 'achievement', - group: 'image-edit', - memberName: 'achievement', - description: 'Sends a Minecraft achievement with the text of your choice.', - clientPermissions: ['ATTACH_FILES'], - args: [ - { - key: 'text', - prompt: 'What should the text of the achievement be?', - type: 'string', - validate: (text) => { - if (text.length < 25) return true; - else return 'Text must be under 25 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'achievement', + group: 'image-edit', + memberName: 'achievement', + description: 'Sends a Minecraft achievement with the text of your choice.', + clientPermissions: ['ATTACH_FILES'], + args: [ + { + key: 'text', + prompt: 'What should the text of the achievement be?', + type: 'string', + validate: text => { + if (text.length < 25) return true; + return 'Text must be under 25 characters.'; + } + } + ] + }); + } - async run(msg, args) { - const { text } = args; - const { body } = await snekfetch - .get('https://www.minecraftskinstealer.com/achievement/a.php') - .query({ - i: 1, - h: 'Achievement Get!', - t: text - }); - return msg.say({ files: [{ attachment: body, name: 'achievement.png' }] }); - } + async run(msg, args) { + const { text } = args; + const { body } = await snekfetch + .get('https://www.minecraftskinstealer.com/achievement/a.php') + .query({ + i: 1, + h: 'Achievement Get!', + t: text + }); + return msg.say({ files: [{ attachment: body, name: 'achievement.png' }] }); + } }; diff --git a/commands/image-edit/meme.js b/commands/image-edit/meme.js index 49bf3704..558d22ea 100644 --- a/commands/image-edit/meme.js +++ b/commands/image-edit/meme.js @@ -2,43 +2,43 @@ const Command = require('../../structures/Command'); const codes = require('../../assets/json/meme'); module.exports = class MemeCommand extends Command { - constructor(client) { - super(client, { - name: 'meme', - group: 'image-edit', - memberName: 'meme', - description: 'Sends a meme with text of your choice, and a background of your choice.', - clientPermissions: ['ATTACH_FILES'], - 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; - else return 'Invalid meme type. Use `help meme` to view a list of meme types.'; - }, - parse: (type) => type.toLowerCase() - }, - { - key: 'top', - prompt: 'What should the top row of the meme to be?', - type: 'string', - parse: (top) => encodeURIComponent(top.replace(/[ ]/g, '-')) - }, - { - key: 'bottom', - prompt: 'What should the bottom row of the meme to be?', - type: 'string', - parse: (bottom) => encodeURIComponent(bottom.replace(/[ ]/g, '-')) - } - ] - }); - } + constructor(client) { + super(client, { + name: 'meme', + group: 'image-edit', + memberName: 'meme', + description: 'Sends a meme with text of your choice, and a background of your choice.', + clientPermissions: ['ATTACH_FILES'], + 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 'Invalid meme type. Use `help meme` to view a list of meme types.'; + }, + parse: type => type.toLowerCase() + }, + { + key: 'top', + prompt: 'What should the top row of the meme to be?', + type: 'string', + parse: top => encodeURIComponent(top.replace(/[ ]/g, '-')) + }, + { + key: 'bottom', + prompt: 'What should the bottom row of the meme to be?', + type: 'string', + parse: bottom => encodeURIComponent(bottom.replace(/[ ]/g, '-')) + } + ] + }); + } - run(msg, args) { - const { type, top, bottom } = args; - return msg.say({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] }); - } + run(msg, args) { + const { type, top, bottom } = args; + return msg.say({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] }); + } }; diff --git a/commands/image-edit/pokemon-fusion.js b/commands/image-edit/pokemon-fusion.js index 7859626c..21f2287f 100644 --- a/commands/image-edit/pokemon-fusion.js +++ b/commands/image-edit/pokemon-fusion.js @@ -2,40 +2,40 @@ const Command = require('../../structures/Command'); const pokemon = require('../../assets/json/pokemon-fusion'); module.exports = class PokemonFusionCommand extends Command { - constructor(client) { - super(client, { - name: 'pokemon-fusion', - aliases: ['poke-fusion', 'poke-fuse'], - group: 'image-edit', - memberName: 'pokemon-fusion', - description: 'Fuses two Generation I Pokémon together.', - args: [ - { - key: 'source1', - prompt: 'What Pokémon should be fused?', - type: 'string', - validate: (source1) => { - if (pokemon[source1.toLowerCase()]) return true; - else return 'Only Pokémon from Generation I may be used.'; - }, - parse: (source1) => pokemon[source1.toLowerCase()] - }, - { - key: 'source2', - prompt: 'What Pokémon should be fused?', - type: 'string', - validate: (source2) => { - if (pokemon[source2.toLowerCase()]) return true; - else return 'Only Pokémon from Generation I may be used.'; - }, - parse: (source2) => pokemon[source2.toLowerCase()] - } - ] - }); - } + constructor(client) { + super(client, { + name: 'pokemon-fusion', + aliases: ['poke-fusion', 'poke-fuse'], + group: 'image-edit', + memberName: 'pokemon-fusion', + description: 'Fuses two Generation I Pokémon together.', + args: [ + { + key: 'source1', + prompt: 'What Pokémon should be fused?', + type: 'string', + validate: source1 => { + if (pokemon[source1.toLowerCase()]) return true; + return 'Only Pokémon from Generation I may be used.'; + }, + parse: source1 => pokemon[source1.toLowerCase()] + }, + { + key: 'source2', + prompt: 'What Pokémon should be fused?', + type: 'string', + validate: source2 => { + if (pokemon[source2.toLowerCase()]) return true; + return 'Only Pokémon from Generation I may be used.'; + }, + parse: source2 => pokemon[source2.toLowerCase()] + } + ] + }); + } - run(msg, args) { - const { source1, source2 } = args; - return msg.say({ files: [`http://images.alexonsager.net/pokemon/fused/${source1}/${source1}.${source2}.png`] }); - } + run(msg, args) { + const { source1, source2 } = args; + return msg.say({ files: [`http://images.alexonsager.net/pokemon/fused/${source1}/${source1}.${source2}.png`] }); + } }; diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 18f0a8c7..db34c92a 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -3,82 +3,82 @@ const { MessageEmbed } = require('discord.js'); const { stripIndents } = require('common-tags'); module.exports = class BanCommand extends Command { - constructor(client) { - super(client, { - name: 'ban', - aliases: ['banne'], - group: 'moderation', - memberName: 'ban', - description: 'Bans a user and logs the ban to the mod logs.', - guildOnly: true, - clientPermissions: ['BAN_MEMBERS'], - userPermissions: ['BAN_MEMBERS'], - 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; - else return 'Reason must be under 140 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'ban', + aliases: ['banne'], + group: 'moderation', + memberName: 'ban', + description: 'Bans a user and logs the ban to the mod logs.', + guildOnly: true, + clientPermissions: ['BAN_MEMBERS'], + userPermissions: ['BAN_MEMBERS'], + 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 'Reason must be under 140 characters.'; + } + } + ] + }); + } - async run(msg, args) { - const modlogs = msg.guild.channels.filter((c) => { - const topic = c.topic || ''; - if (topic.includes('')) return true; - else return false; - }).first() || msg.guild.channels.find('name', 'mod-log'); - const { member, reason } = args; - if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); - await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 30000 - }); - if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); - try { - await member.send(stripIndents` - You were banned from ${msg.guild.name}! - Reason: ${reason} - `); - } catch (err) { - await msg.say('Failed to Send DM.'); - } - await member.ban({ - days: 7, - reason: `${msg.author.tag}: ${reason}` - }); - await msg.say(`Successfully banned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { - return msg.say('Could not log the ban to the mod logs.'); - } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { - const embed = new MessageEmbed() - .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) - .setColor(0xFF0000) - .setTimestamp() - .setDescription(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Ban - **Reason:** ${reason} - `); - return modlogs.send({ embed }); - } else { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Ban - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } - } + async run(msg, args) { + const modlogs = msg.guild.channels.filter(c => { + const topic = c.topic || ''; + if (topic.includes('')) return true; + return false; + }).first() || msg.guild.channels.find('name', 'mod-log'); + const { member, reason } = args; + if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); + await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 30000 + }); + if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); + try { + await member.send(stripIndents` + You were banned from ${msg.guild.name}! + Reason: ${reason} + `); + } catch (err) { + await msg.say('Failed to Send DM.'); + } + await member.ban({ + days: 7, + reason: `${msg.author.tag}: ${reason}` + }); + await msg.say(`Successfully banned ${member.user.tag}.`); + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { + return msg.say('Could not log the ban to the mod logs.'); + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { + const embed = new MessageEmbed() + .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) + .setColor(0xFF0000) + .setTimestamp() + .setDescription(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Ban + **Reason:** ${reason} + `); + return modlogs.send({ embed }); + } else { + return modlogs.send(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Ban + **Reason:** ${reason} + **Moderator:** ${msg.author.tag} + `); + } + } }; diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index 92dc52b3..948c1694 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -3,79 +3,79 @@ const { MessageEmbed } = require('discord.js'); const { stripIndents } = require('common-tags'); module.exports = class KickCommand extends Command { - constructor(client) { - super(client, { - name: 'kick', - aliases: ['kickke'], - group: 'moderation', - memberName: 'kick', - description: 'Kicks a user and logs the kick to the mod logs.', - guildOnly: true, - clientPermissions: ['KICK_MEMBERS'], - userPermissions: ['KICK_MEMBERS'], - 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; - else return 'Reason must be under 140 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'kick', + aliases: ['kickke'], + group: 'moderation', + memberName: 'kick', + description: 'Kicks a user and logs the kick to the mod logs.', + guildOnly: true, + clientPermissions: ['KICK_MEMBERS'], + userPermissions: ['KICK_MEMBERS'], + 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 'Reason must be under 140 characters.'; + } + } + ] + }); + } - async run(msg, args) { - const modlogs = msg.guild.channels.filter((c) => { - const topic = c.topic || ''; - if (topic.includes('')) return true; - else return false; - }).first() || msg.guild.channels.find('name', 'mod-log'); - const { member, reason } = args; - if (!member.kickable) return msg.say('This member is not kickable. Perhaps they have a higher role than me?'); - await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 30000 - }); - if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); - try { - await member.send(stripIndents` - You were kicked from ${msg.guild.name}! - Reason: ${reason} - `); - } catch (err) { - await msg.say('Failed to Send DM.'); - } - await member.kick(`${msg.author.tag}: ${reason}`); - await msg.say(`Successfully kicked ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { - return msg.say('Could not log the kick to the mod logs.'); - } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { - const embed = new MessageEmbed() - .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) - .setColor(0xFFA500) - .setTimestamp() - .setDescription(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Kick - **Reason:** ${reason} - `); - return modlogs.send({ embed }); - } else { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Kick - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } - } + async run(msg, args) { + const modlogs = msg.guild.channels.filter(c => { + const topic = c.topic || ''; + if (topic.includes('')) return true; + return false; + }).first() || msg.guild.channels.find('name', 'mod-log'); + const { member, reason } = args; + if (!member.kickable) return msg.say('This member is not kickable. Perhaps they have a higher role than me?'); + await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 30000 + }); + if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); + try { + await member.send(stripIndents` + You were kicked from ${msg.guild.name}! + Reason: ${reason} + `); + } catch (err) { + await msg.say('Failed to Send DM.'); + } + await member.kick(`${msg.author.tag}: ${reason}`); + await msg.say(`Successfully kicked ${member.user.tag}.`); + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { + return msg.say('Could not log the kick to the mod logs.'); + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { + const embed = new MessageEmbed() + .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) + .setColor(0xFFA500) + .setTimestamp() + .setDescription(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Kick + **Reason:** ${reason} + `); + return modlogs.send({ embed }); + } else { + return modlogs.send(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Kick + **Reason:** ${reason} + **Moderator:** ${msg.author.tag} + `); + } + } }; diff --git a/commands/moderation/lockdown.js b/commands/moderation/lockdown.js index 2fe94a96..025c6243 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -2,42 +2,42 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class LockdownCommand extends Command { - constructor(client) { - super(client, { - name: 'lockdown', - group: 'moderation', - memberName: 'lockdown', - description: 'Prevents users from posting in the current channel, or removes a lockdown.', - guildOnly: true, - clientPermissions: ['ADMINISTRATOR'], - userPermissions: ['ADMINISTRATOR'], - args: [ - { - key: 'type', - prompt: 'Please enter either start or stop.', - type: 'string', - default: 'start', - validate: (type) => { - if (['start', 'stop'].includes(type.toLowerCase())) return true; - else return 'Please enter either start or stop.'; - }, - parse: (type) => type.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'lockdown', + group: 'moderation', + memberName: 'lockdown', + description: 'Prevents users from posting in the current channel, or removes a lockdown.', + guildOnly: true, + clientPermissions: ['ADMINISTRATOR'], + userPermissions: ['ADMINISTRATOR'], + args: [ + { + key: 'type', + prompt: 'Please enter either start or stop.', + type: 'string', + default: 'start', + validate: type => { + if (['start', 'stop'].includes(type.toLowerCase())) return true; + return 'Please enter either start or stop.'; + }, + parse: type => type.toLowerCase() + } + ] + }); + } - async run(msg, args) { - const { type } = args; - if (type === 'start') { - await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: false }); - return msg.say(stripIndents` - Lockdown Started, users without Administrator can no longer post messages. - Please use \`lockdown stop\` to end the lockdown. - `); - } else { - await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: null }); - return msg.say('Lockdown Ended.'); - } - } + async run(msg, args) { // eslint-disable-line consistent-return + const { type } = args; + if (type === 'start') { + await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: false }); + return msg.say(stripIndents` + Lockdown Started, users without Administrator can no longer post messages. + Please use \`lockdown stop\` to end the lockdown. + `); + } else if (type === 'stop') { + await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: null }); + return msg.say('Lockdown Ended.'); + } + } }; diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index c598085c..2b26d994 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -1,42 +1,42 @@ const Command = require('../../structures/Command'); module.exports = class PruneCommand extends Command { - constructor(client) { - super(client, { - name: 'prune', - group: 'moderation', - memberName: 'prune', - description: 'Deletes up to 99 messages from the current channel.', - guildOnly: true, - throttling: { - usages: 1, - duration: 15 - }, - clientPermissions: ['READ_MESSAGE_HISTORY', 'MANAGE_MESSAGES'], - userPermissions: ['MANAGE_MESSAGES'], - 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; - else return 'Count must be from 1-99.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'prune', + group: 'moderation', + memberName: 'prune', + description: 'Deletes up to 99 messages from the current channel.', + guildOnly: true, + throttling: { + usages: 1, + duration: 15 + }, + clientPermissions: ['READ_MESSAGE_HISTORY', 'MANAGE_MESSAGES'], + userPermissions: ['MANAGE_MESSAGES'], + 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 must be from 1-99.'; + } + } + ] + }); + } - async run(msg, args) { - const { count } = args; - try { - const messages = await msg.channel.fetchMessages({ limit: count + 1 }); - await msg.channel.bulkDelete(messages, true); - return null; - } catch (err) { - return msg.say('There are no messages younger than two weeks that can be deleted.'); - } - } + async run(msg, args) { + const { count } = args; + try { + const messages = await msg.channel.fetchMessages({ limit: count + 1 }); + await msg.channel.bulkDelete(messages, true); + return null; + } catch (err) { + return msg.say('There are no messages younger than two weeks that can be deleted.'); + } + } }; diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 84a8b138..b5613d06 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -3,83 +3,83 @@ const { MessageEmbed } = require('discord.js'); const { stripIndents } = require('common-tags'); module.exports = class SoftbanCommand extends Command { - constructor(client) { - super(client, { - name: 'softban', - aliases: ['softbanne'], - group: 'moderation', - memberName: 'softban', - description: 'Kicks a user and deletes their messages, and logs the softban to the mod logs.', - guildOnly: true, - clientPermissions: ['BAN_MEMBERS'], - userPermissions: ['KICK_MEMBERS'], - 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; - else return 'Reason must be under 140 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'softban', + aliases: ['softbanne'], + group: 'moderation', + memberName: 'softban', + description: 'Kicks a user and deletes their messages, and logs the softban to the mod logs.', + guildOnly: true, + clientPermissions: ['BAN_MEMBERS'], + userPermissions: ['KICK_MEMBERS'], + 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 'Reason must be under 140 characters.'; + } + } + ] + }); + } - async run(msg, args) { - const modlogs = msg.guild.channels.filter((c) => { - const topic = c.topic || ''; - if (topic.includes('')) return true; - else return false; - }).first() || msg.guild.channels.find('name', 'mod-log'); - const { member, reason } = args; - if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); - await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 30000 - }); - if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); - try { - await member.send(stripIndents` - You were softbanned from ${msg.guild.name}! - Reason: ${reason} - `); - } catch (err) { - await msg.say('Failed to Send DM.'); - } - await member.ban({ - days: 7, - reason: `${msg.author.tag}: ${reason} (Softban)` - }); - await msg.guild.unban(member.user, 'Softban'); - await msg.say(`Successfully softbanned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { - return msg.say('Could not log the softban to the mod logs.'); - } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { - const embed = new MessageEmbed() - .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) - .setColor(0xFF4500) - .setTimestamp() - .setDescription(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Softban - **Reason:** ${reason} - `); - return modlogs.send({ embed }); - } else { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Softban - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } - } + async run(msg, args) { + const modlogs = msg.guild.channels.filter(c => { + const topic = c.topic || ''; + if (topic.includes('')) return true; + return false; + }).first() || msg.guild.channels.find('name', 'mod-log'); + const { member, reason } = args; + if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); + await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 30000 + }); + if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); + try { + await member.send(stripIndents` + You were softbanned from ${msg.guild.name}! + Reason: ${reason} + `); + } catch (err) { + await msg.say('Failed to Send DM.'); + } + await member.ban({ + days: 7, + reason: `${msg.author.tag}: ${reason} (Softban)` + }); + await msg.guild.unban(member.user, 'Softban'); + await msg.say(`Successfully softbanned ${member.user.tag}.`); + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { + return msg.say('Could not log the softban to the mod logs.'); + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { + const embed = new MessageEmbed() + .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) + .setColor(0xFF4500) + .setTimestamp() + .setDescription(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Softban + **Reason:** ${reason} + `); + return modlogs.send({ embed }); + } else { + return modlogs.send(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Softban + **Reason:** ${reason} + **Moderator:** ${msg.author.tag} + `); + } + } }; diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 6e5a6d4c..4e9e0e56 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -3,73 +3,73 @@ const { MessageEmbed } = require('discord.js'); const { stripIndents } = require('common-tags'); module.exports = class UnbanCommand extends Command { - constructor(client) { - super(client, { - name: 'unban', - aliases: ['unbanne'], - group: 'moderation', - memberName: 'unban', - description: 'Unbans a user and logs the unban to the mod logs.', - guildOnly: true, - clientPermissions: ['BAN_MEMBERS'], - userPermissions: ['BAN_MEMBERS'], - args: [ - { - key: 'id', - prompt: 'What is the id of the member you want to unban?', - type: 'string' - }, - { - key: 'reason', - prompt: 'What do you want to set the reason as?', - type: 'string', - validate: (reason) => { - if (reason.length < 140) return true; - else return 'Reason must be under 140 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'unban', + aliases: ['unbanne'], + group: 'moderation', + memberName: 'unban', + description: 'Unbans a user and logs the unban to the mod logs.', + guildOnly: true, + clientPermissions: ['BAN_MEMBERS'], + userPermissions: ['BAN_MEMBERS'], + args: [ + { + key: 'id', + prompt: 'What is the id of the member you want to unban?', + type: 'string' + }, + { + key: 'reason', + prompt: 'What do you want to set the reason as?', + type: 'string', + validate: reason => { + if (reason.length < 140) return true; + return 'Reason must be under 140 characters.'; + } + } + ] + }); + } - async run(msg, args) { - const modlogs = msg.guild.channels.filter((c) => { - const topic = c.topic || ''; - if (topic.includes('')) return true; - else return false; - }).first() || msg.guild.channels.find('name', 'mod-log'); - const { id, reason } = args; - const bans = await msg.guild.fetchBans(); - if (!bans.has(id)) return msg.say('This ID is not in the Guild Banlist.'); - const member = bans.get(id).user; - await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 30000 - }); - if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); - await msg.guild.unban(member, `${msg.author.tag}: ${reason}`); - await msg.say(`Successfully unbanned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { - return msg.say('Could not log the unban to the mod logs.'); - } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { - const embed = new MessageEmbed() - .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) - .setColor(0x00AE86) - .setTimestamp() - .setDescription(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Unban - **Reason:** ${reason} - `); - return modlogs.send({ embed }); - } else { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Unban - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } - } + async run(msg, args) { + const modlogs = msg.guild.channels.filter(c => { + const topic = c.topic || ''; + if (topic.includes('')) return true; + return false; + }).first() || msg.guild.channels.find('name', 'mod-log'); + const { id, reason } = args; + const bans = await msg.guild.fetchBans(); + if (!bans.has(id)) return msg.say('This ID is not in the Guild Banlist.'); + const member = bans.get(id).user; + await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 30000 + }); + if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); + await msg.guild.unban(member, `${msg.author.tag}: ${reason}`); + await msg.say(`Successfully unbanned ${member.user.tag}.`); + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { + return msg.say('Could not log the unban to the mod logs.'); + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { + const embed = new MessageEmbed() + .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) + .setColor(0x00AE86) + .setTimestamp() + .setDescription(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Unban + **Reason:** ${reason} + `); + return modlogs.send({ embed }); + } else { + return modlogs.send(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Unban + **Reason:** ${reason} + **Moderator:** ${msg.author.tag} + `); + } + } }; diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index 61a8f827..297e5f38 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -3,76 +3,76 @@ const { MessageEmbed } = require('discord.js'); const { stripIndents } = require('common-tags'); module.exports = class WarnCommand extends Command { - constructor(client) { - super(client, { - name: 'warn', - aliases: ['warnne'], - group: 'moderation', - memberName: 'warn', - description: 'Warns a user and logs the warn to the mod logs.', - guildOnly: true, - userPermissions: ['KICK_MEMBERS'], - 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; - else return 'Invalid Reason. Reason must be under 140 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'warn', + aliases: ['warnne'], + group: 'moderation', + memberName: 'warn', + description: 'Warns a user and logs the warn to the mod logs.', + guildOnly: true, + userPermissions: ['KICK_MEMBERS'], + 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 'Invalid Reason. Reason must be under 140 characters.'; + } + } + ] + }); + } - async run(msg, args) { - const modlogs = msg.guild.channels.filter((c) => { - const topic = c.topic || ''; - if (topic.includes('')) return true; - else return false; - }).first() || msg.guild.channels.find('name', 'mod-log'); - const { member, reason } = args; - await msg.say(`Are you sure you want to warn ${member.user.tag} (${member.id})?`); - const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, { - max: 1, - time: 30000 - }); - if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); - try { - await member.user.send(stripIndents` - You were warned in ${msg.guild.name}! - Reason: ${reason} - `); - } catch (err) { - await msg.say('Failed to Send DM.'); - } - await msg.say(`Successfully warned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { - return msg.say('Could not log the warn to the mod logs.'); - } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { - const embed = new MessageEmbed() - .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) - .setColor(0xFFFF00) - .setTimestamp() - .setDescription(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Warn - **Reason:** ${reason} - `); - return modlogs.send({ embed }); - } else { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Warn - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } - } + async run(msg, args) { + const modlogs = msg.guild.channels.filter(c => { + const topic = c.topic || ''; + if (topic.includes('')) return true; + return false; + }).first() || msg.guild.channels.find('name', 'mod-log'); + const { member, reason } = args; + await msg.say(`Are you sure you want to warn ${member.user.tag} (${member.id})?`); + const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { + max: 1, + time: 30000 + }); + if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); + try { + await member.user.send(stripIndents` + You were warned in ${msg.guild.name}! + Reason: ${reason} + `); + } catch (err) { + await msg.say('Failed to Send DM.'); + } + await msg.say(`Successfully warned ${member.user.tag}.`); + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { + return msg.say('Could not log the warn to the mod logs.'); + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { + const embed = new MessageEmbed() + .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) + .setColor(0xFFFF00) + .setTimestamp() + .setDescription(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Warn + **Reason:** ${reason} + `); + return modlogs.send({ embed }); + } else { + return modlogs.send(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Warn + **Reason:** ${reason} + **Moderator:** ${msg.author.tag} + `); + } + } }; diff --git a/commands/num-edit/currency.js b/commands/num-edit/currency.js index 6eb8439a..7a2e7160 100644 --- a/commands/num-edit/currency.js +++ b/commands/num-edit/currency.js @@ -3,52 +3,52 @@ const snekfetch = require('snekfetch'); const codes = require('../../assets/json/currency'); module.exports = class CurrencyCommand extends Command { - constructor(client) { - super(client, { - name: 'currency', - group: 'num-edit', - memberName: 'currency', - description: 'Converts a number from one currency to another.', - details: `**Codes:** ${codes.join(', ')}`, - args: [ - { - key: 'base', - prompt: 'What currency code do you want to use as the base?', - type: 'string', - validate: (base) => { - if (codes.includes(base.toUpperCase())) return true; - else return 'Invalid Currency Code. Use `help currency` to view a list of currency codes.'; - }, - parse: (base) => base.toUpperCase() - }, - { - key: 'to', - prompt: 'What currency code do you want to convert to?', - type: 'string', - validate: (to) => { - if (codes.includes(to.toUpperCase())) return true; - else return 'Invalid Currency Code. Use `help currency` to view a list of currency codes.'; - }, - parse: (to) => to.toUpperCase() - }, - { - key: 'amount', - prompt: 'How much money should be converted? Do not use symbols.', - type: 'integer' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'currency', + group: 'num-edit', + memberName: 'currency', + description: 'Converts a number from one currency to another.', + details: `**Codes:** ${codes.join(', ')}`, + args: [ + { + key: 'base', + prompt: 'What currency code do you want to use as the base?', + type: 'string', + validate: base => { + if (codes.includes(base.toUpperCase())) return true; + return 'Invalid Currency Code. Use `help currency` to view a list of currency codes.'; + }, + parse: base => base.toUpperCase() + }, + { + key: 'to', + prompt: 'What currency code do you want to convert to?', + type: 'string', + validate: to => { + if (codes.includes(to.toUpperCase())) return true; + return 'Invalid Currency Code. Use `help currency` to view a list of currency codes.'; + }, + parse: to => to.toUpperCase() + }, + { + key: 'amount', + prompt: 'How much money should be converted? Do not use symbols.', + type: 'integer' + } + ] + }); + } - async run(msg, args) { - const { base, to, amount } = args; - if (base === to) return msg.say(`Converting ${base} to ${to} is the same value, dummy.`); - const { body } = await snekfetch - .get('http://api.fixer.io/latest') - .query({ - base, - symbols: to - }); - return msg.say(`${amount} ${base} is ${amount * body.rates[to]} ${to}.`); - } + async run(msg, args) { + const { base, to, amount } = args; + if (base === to) return msg.say(`Converting ${base} to ${to} is the same value, dummy.`); + const { body } = await snekfetch + .get('http://api.fixer.io/latest') + .query({ + base, + symbols: to + }); + return msg.say(`${amount} ${base} is ${amount * body.rates[to]} ${to}.`); + } }; diff --git a/commands/num-edit/math.js b/commands/num-edit/math.js index ad5af559..d6ff5590 100644 --- a/commands/num-edit/math.js +++ b/commands/num-edit/math.js @@ -2,29 +2,29 @@ const Command = require('../../structures/Command'); const math = require('mathjs'); module.exports = class MathCommand extends Command { - constructor(client) { - super(client, { - name: 'math', - group: 'num-edit', - memberName: 'math', - description: 'Evaluates math expressions.', - args: [ - { - key: 'expression', - prompt: 'What do you want to answer?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'math', + group: 'num-edit', + memberName: 'math', + description: 'Evaluates math expressions.', + args: [ + { + key: 'expression', + prompt: 'What do you want to answer?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { expression } = args; - try { - const solved = math.eval(expression).toString(); - return msg.say(solved).catch(() => msg.say('Invalid Statement')); - } catch (err) { - return msg.say('Invalid Statement'); - } - } + run(msg, args) { + const { expression } = args; + try { + const solved = math.eval(expression).toString(); + return msg.say(solved).catch(() => msg.say('Invalid Statement')); + } catch (err) { + return msg.say('Invalid Statement'); + } + } }; diff --git a/commands/num-edit/temperature.js b/commands/num-edit/temperature.js index 37019f2b..10b537f5 100644 --- a/commands/num-edit/temperature.js +++ b/commands/num-edit/temperature.js @@ -1,55 +1,55 @@ const Command = require('../../structures/Command'); module.exports = class TemperatureCommand extends Command { - constructor(client) { - super(client, { - name: 'temperature', - group: 'num-edit', - memberName: 'temperature', - description: 'Converts temperatures to/from Celsius, Fahrenheit, or Kelvin.', - args: [ - { - key: 'base', - prompt: 'What temperature unit do you want to use as the base?', - type: 'string', - validate: (base) => { - if (['celsius', 'fahrenheit', 'kelvin'].includes(base.toLowerCase())) return true; - else return 'Please enter either celsius, fahrenheit, or kelvin.'; - }, - parse: (base) => base.toLowerCase() - }, - { - key: 'to', - prompt: 'What temperature unit do you want to convert to?', - type: 'string', - validate: (to) => { - if (['celsius', 'fahrenheit', 'kelvin'].includes(to.toLowerCase())) return true; - else return 'Please enter either celsius, fahrenheit, or kelvin.'; - }, - parse: (to) => to.toLowerCase() - }, - { - key: 'amount', - prompt: 'What temperature should be converted?', - type: 'integer' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'temperature', + group: 'num-edit', + memberName: 'temperature', + description: 'Converts temperatures to/from Celsius, Fahrenheit, or Kelvin.', + args: [ + { + key: 'base', + prompt: 'What temperature unit do you want to use as the base?', + type: 'string', + validate: base => { + if (['celsius', 'fahrenheit', 'kelvin'].includes(base.toLowerCase())) return true; + return 'Please enter either celsius, fahrenheit, or kelvin.'; + }, + parse: base => base.toLowerCase() + }, + { + key: 'to', + prompt: 'What temperature unit do you want to convert to?', + type: 'string', + validate: to => { + if (['celsius', 'fahrenheit', 'kelvin'].includes(to.toLowerCase())) return true; + return 'Please enter either celsius, fahrenheit, or kelvin.'; + }, + parse: to => to.toLowerCase() + }, + { + key: 'amount', + prompt: 'What temperature should be converted?', + type: 'integer' + } + ] + }); + } - run(msg, args) { // eslint-disable-line consistent-return - const { base, to, amount } = args; - if (base === to) { - return msg.say(`Converting ${base} to ${to} is the same value, dummy.`); - } else if (base === 'celsius') { - if (to === 'fahrenheit') return msg.say(`${amount}°C is ${(amount * 1.8) + 32}°F.`); - else if (to === 'kelvin') return msg.say(`${amount}°C is ${amount + 273.15}°K.`); - } else if (base === 'fahrenheit') { - if (to === 'celsius') return msg.say(`${amount}°F is ${(amount - 32) / 1.8}°C.`); - else if (to === 'kelvin') return msg.say(`${amount}°F is ${(amount + 459.67) * (5 / 9)}°K.`); - } else if (base === 'kelvin') { - if (to === 'celsius') return msg.say(`${amount}°K is ${amount - 273.15}°C.`); - else if (to === 'fahrenheit') return msg.say(`${amount}°K is ${(amount * 1.8) - 459.67}°F.`); - } - } + run(msg, args) { // eslint-disable-line consistent-return + const { base, to, amount } = args; + if (base === to) { + return msg.say(`Converting ${base} to ${to} is the same value, dummy.`); + } else if (base === 'celsius') { + if (to === 'fahrenheit') return msg.say(`${amount}°C is ${(amount * 1.8) + 32}°F.`); + else if (to === 'kelvin') return msg.say(`${amount}°C is ${amount + 273.15}°K.`); + } else if (base === 'fahrenheit') { + if (to === 'celsius') return msg.say(`${amount}°F is ${(amount - 32) / 1.8}°C.`); + else if (to === 'kelvin') return msg.say(`${amount}°F is ${(amount + 459.67) * (5 / 9)}°K.`); + } else if (base === 'kelvin') { + if (to === 'celsius') return msg.say(`${amount}°K is ${amount - 273.15}°C.`); + else if (to === 'fahrenheit') return msg.say(`${amount}°K is ${(amount * 1.8) - 459.67}°F.`); + } + } }; diff --git a/commands/random-img/cat.js b/commands/random-img/cat.js index 3e5872f3..9361d6c8 100644 --- a/commands/random-img/cat.js +++ b/commands/random-img/cat.js @@ -2,19 +2,19 @@ const Command = require('../../structures/Command'); const snekfetch = require('snekfetch'); module.exports = class CatCommand extends Command { - constructor(client) { - super(client, { - name: 'cat', - aliases: ['neko'], - group: 'random-img', - memberName: 'cat', - description: 'Responds with a random cat image.' - }); - } + constructor(client) { + super(client, { + name: 'cat', + aliases: ['neko'], + group: 'random-img', + memberName: 'cat', + description: 'Responds with a random cat image.' + }); + } - async run(msg) { - const { body } = await snekfetch - .get('http://random.cat/meow'); - return msg.say(body.file); - } + async run(msg) { + const { body } = await snekfetch + .get('http://random.cat/meow'); + return msg.say(body.file); + } }; diff --git a/commands/random-img/danbooru.js b/commands/random-img/danbooru.js index ea2adc65..b95d1607 100644 --- a/commands/random-img/danbooru.js +++ b/commands/random-img/danbooru.js @@ -3,36 +3,36 @@ const { stripIndents } = require('common-tags'); const snekfetch = require('snekfetch'); module.exports = class DanbooruCommand extends Command { - constructor(client) { - super(client, { - name: 'danbooru', - group: 'random-img', - memberName: 'danbooru', - description: 'Searches Danbooru with optional query.', - nsfw: true, - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'danbooru', + group: 'random-img', + memberName: 'danbooru', + description: 'Searches Danbooru with optional query.', + nsfw: true, + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string', + default: '' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://danbooru.donmai.us/posts.json') - .query({ - tags: `${query ? `${query} ` : ''}order:random`, - limit: 1 - }); - if (!body.length || !body[0].file_url) return msg.say('No Results'); - return msg.say(stripIndents` - ${query ? `Result for ${query}:` : 'Random Image:'} - https://danbooru.donmai.us${body[0].file_url} - `); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://danbooru.donmai.us/posts.json') + .query({ + tags: `${query ? `${query} ` : ''}order:random`, + limit: 1 + }); + if (!body.length || !body[0].file_url) return msg.say('No Results'); + return msg.say(stripIndents` + ${query ? `Result for ${query}:` : 'Random Image:'} + https://danbooru.donmai.us${body[0].file_url} + `); + } }; diff --git a/commands/random-img/dog.js b/commands/random-img/dog.js index 300a5fd6..7ae5abf1 100644 --- a/commands/random-img/dog.js +++ b/commands/random-img/dog.js @@ -2,18 +2,18 @@ const Command = require('../../structures/Command'); const snekfetch = require('snekfetch'); module.exports = class DogCommand extends Command { - constructor(client) { - super(client, { - name: 'dog', - group: 'random-img', - memberName: 'dog', - description: 'Responds with a random dog image.' - }); - } + constructor(client) { + super(client, { + name: 'dog', + group: 'random-img', + memberName: 'dog', + description: 'Responds with a random dog image.' + }); + } - async run(msg) { - const { body } = await snekfetch - .get('https://random.dog/woof.json'); - return msg.say(body.url); - } + async run(msg) { + const { body } = await snekfetch + .get('https://random.dog/woof.json'); + return msg.say(body.url); + } }; diff --git a/commands/random-img/gelbooru.js b/commands/random-img/gelbooru.js index fd023d0f..b47ba172 100644 --- a/commands/random-img/gelbooru.js +++ b/commands/random-img/gelbooru.js @@ -5,40 +5,40 @@ const { promisifyAll } = require('tsubaki'); const xml = promisifyAll(require('xml2js')); module.exports = class GelbooruCommand extends Command { - constructor(client) { - super(client, { - name: 'gelbooru', - group: 'random-img', - memberName: 'gelbooru', - description: 'Searches Gelbooru with optional query.', - nsfw: true, - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'gelbooru', + group: 'random-img', + memberName: 'gelbooru', + description: 'Searches Gelbooru with optional query.', + nsfw: true, + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string', + default: '' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { text } = await snekfetch - .get('https://gelbooru.com/index.php') - .query({ - page: 'dapi', - s: 'post', - q: 'index', - tags: query, - limit: 200 - }); - const { posts } = await xml.parseStringAsync(text); - if (posts.$.count === '0') return msg.say('No Results.'); - return msg.say(stripIndents` - ${query ? `Result for ${query}:` : 'Random Image:'} - https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url} - `); - } + async run(msg, args) { + const { query } = args; + const { text } = await snekfetch + .get('https://gelbooru.com/index.php') + .query({ + page: 'dapi', + s: 'post', + q: 'index', + tags: query, + limit: 200 + }); + const { posts } = await xml.parseStringAsync(text); + if (posts.$.count === '0') return msg.say('No Results.'); + return msg.say(stripIndents` + ${query ? `Result for ${query}:` : 'Random Image:'} + https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url} + `); + } }; diff --git a/commands/random-img/konachan.js b/commands/random-img/konachan.js index ed4d6bc2..9d946607 100644 --- a/commands/random-img/konachan.js +++ b/commands/random-img/konachan.js @@ -3,36 +3,36 @@ const { stripIndents } = require('common-tags'); const snekfetch = require('snekfetch'); module.exports = class KonachanCommand extends Command { - constructor(client) { - super(client, { - name: 'konachan', - group: 'random-img', - memberName: 'konachan', - description: 'Searches Konachan with optional query.', - nsfw: true, - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'konachan', + group: 'random-img', + memberName: 'konachan', + description: 'Searches Konachan with optional query.', + nsfw: true, + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string', + default: '' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://konachan.net/post.json') - .query({ - tags: `${query ? `${query} ` : ''}order:random`, - limit: 1 - }); - if (!body.length) return msg.say('No Results.'); - return msg.say(stripIndents` - ${query ? `Result for ${query}:` : 'Random Image:'} - https:${body[0].file_url} - `); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://konachan.net/post.json') + .query({ + tags: `${query ? `${query} ` : ''}order:random`, + limit: 1 + }); + if (!body.length) return msg.say('No Results.'); + return msg.say(stripIndents` + ${query ? `Result for ${query}:` : 'Random Image:'} + https:${body[0].file_url} + `); + } }; diff --git a/commands/random-img/rule34.js b/commands/random-img/rule34.js index e17b1c21..90abbe54 100644 --- a/commands/random-img/rule34.js +++ b/commands/random-img/rule34.js @@ -5,40 +5,40 @@ const { promisifyAll } = require('tsubaki'); const xml = promisifyAll(require('xml2js')); module.exports = class Rule34Command extends Command { - constructor(client) { - super(client, { - name: 'rule34', - group: 'random-img', - memberName: 'rule34', - description: 'Searches Rule34 with optional query.', - nsfw: true, - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'rule34', + group: 'random-img', + memberName: 'rule34', + description: 'Searches Rule34 with optional query.', + nsfw: true, + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string', + default: '' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { text } = await snekfetch - .get('https://rule34.xxx/index.php') - .query({ - page: 'dapi', - s: 'post', - q: 'index', - tags: query, - limit: 200 - }); - const { posts } = await xml.parseStringAsync(text); - if (posts.$.count === '0') return msg.say('No Results.'); - return msg.say(stripIndents` - ${query ? `Result for ${query}:` : 'Random Image:'} - https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url} - `); - } + async run(msg, args) { + const { query } = args; + const { text } = await snekfetch + .get('https://rule34.xxx/index.php') + .query({ + page: 'dapi', + s: 'post', + q: 'index', + tags: query, + limit: 200 + }); + const { posts } = await xml.parseStringAsync(text); + if (posts.$.count === '0') return msg.say('No Results.'); + return msg.say(stripIndents` + ${query ? `Result for ${query}:` : 'Random Image:'} + https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url} + `); + } }; diff --git a/commands/random-img/xiao.js b/commands/random-img/xiao.js index a33b5dbf..a708fe5f 100644 --- a/commands/random-img/xiao.js +++ b/commands/random-img/xiao.js @@ -2,19 +2,19 @@ const Command = require('../../structures/Command'); const xiaos = require('../../assets/json/xiao'); module.exports = class XiaoCommand extends Command { - constructor(client) { - super(client, { - name: 'xiao', - aliases: ['xiao-pai', 'iao'], - group: 'random-img', - memberName: 'xiao', - description: 'Responds with a random image of Xiao Pai.', - clientPermissions: ['ATTACH_FILES'] - }); - } + constructor(client) { + super(client, { + name: 'xiao', + aliases: ['xiao-pai', 'iao'], + group: 'random-img', + memberName: 'xiao', + description: 'Responds with a random image of Xiao Pai.', + clientPermissions: ['ATTACH_FILES'] + }); + } - run(msg) { - const xiao = xiaos[Math.floor(Math.random() * xiaos.length)]; - return msg.say({ files: [xiao] }); - } + run(msg) { + const xiao = xiaos[Math.floor(Math.random() * xiaos.length)]; + return msg.say({ files: [xiao] }); + } }; diff --git a/commands/random-res/8-ball.js b/commands/random-res/8-ball.js index ba94cf37..6961e5ee 100644 --- a/commands/random-res/8-ball.js +++ b/commands/random-res/8-ball.js @@ -3,28 +3,28 @@ const { stripIndents } = require('common-tags'); const answers = require('../../assets/json/8-ball'); module.exports = class MagicBallCommand extends Command { - constructor(client) { - super(client, { - name: '8-ball', - group: 'random-res', - memberName: '8-ball', - description: 'Asks your question to the Magic 8 Ball.', - args: [ - { - key: 'question', - prompt: 'What do you want to ask the 8 ball?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: '8-ball', + group: 'random-res', + memberName: '8-ball', + description: 'Asks your question to the Magic 8 Ball.', + args: [ + { + key: 'question', + prompt: 'What do you want to ask the 8 ball?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { question } = args; - const answer = answers[Math.floor(Math.random() * answers.length)]; - return msg.say(stripIndents` - Question: ${question} - :8ball: ${answer} :8ball: - `); - } + run(msg, args) { + const { question } = args; + const answer = answers[Math.floor(Math.random() * answers.length)]; + return msg.say(stripIndents` + Question: ${question} + :8ball: ${answer} :8ball: + `); + } }; diff --git a/commands/random-res/choose.js b/commands/random-res/choose.js index 521c89f8..40c53062 100644 --- a/commands/random-res/choose.js +++ b/commands/random-res/choose.js @@ -1,26 +1,26 @@ const Command = require('../../structures/Command'); module.exports = class ChooseCommand extends Command { - constructor(client) { - super(client, { - name: 'choose', - group: 'random-res', - memberName: 'choose', - description: 'Chooses between options you provide.', - args: [ - { - key: 'choices', - prompt: 'What choices do you want me pick from?', - type: 'string', - infinite: true - } - ] - }); - } + constructor(client) { + super(client, { + name: 'choose', + group: 'random-res', + memberName: 'choose', + description: 'Chooses between options you provide.', + args: [ + { + key: 'choices', + prompt: 'What choices do you want me pick from?', + type: 'string', + infinite: true + } + ] + }); + } - run(msg, args) { - const { choices } = args; - const choice = choices[Math.floor(Math.random() * choices.length)]; - return msg.say(`I choose ${choice}!`); - } + run(msg, args) { + const { choices } = args; + const choice = choices[Math.floor(Math.random() * choices.length)]; + return msg.say(`I choose ${choice}!`); + } }; diff --git a/commands/random-res/chuck-norris.js b/commands/random-res/chuck-norris.js index 051fc9cf..6acb6834 100644 --- a/commands/random-res/chuck-norris.js +++ b/commands/random-res/chuck-norris.js @@ -2,32 +2,32 @@ const Command = require('../../structures/Command'); const snekfetch = require('snekfetch'); module.exports = class ChuckNorrisCommand extends Command { - constructor(client) { - super(client, { - name: 'chuck-norris', - aliases: ['chuck', 'norris'], - group: 'random-res', - memberName: 'chuck-norris', - description: 'Responds with a Chuck Norris quote.', - args: [ - { - key: 'name', - prompt: 'What would you like the name to be?', - type: 'string', - default: 'Chuck' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'chuck-norris', + aliases: ['chuck', 'norris'], + group: 'random-res', + memberName: 'chuck-norris', + description: 'Responds with a Chuck Norris quote.', + args: [ + { + key: 'name', + prompt: 'What would you like the name to be?', + type: 'string', + default: 'Chuck' + } + ] + }); + } - async run(msg, args) { - const { name } = args; - const { body } = await snekfetch - .get('http://api.icndb.com/jokes/random') - .query({ - escape: 'javascript', - firstName: name - }); - return msg.say(body.value.joke); - } + async run(msg, args) { + const { name } = args; + const { body } = await snekfetch + .get('http://api.icndb.com/jokes/random') + .query({ + escape: 'javascript', + firstName: name + }); + return msg.say(body.value.joke); + } }; diff --git a/commands/random-res/coin.js b/commands/random-res/coin.js index db1fc04c..ceed7e6a 100644 --- a/commands/random-res/coin.js +++ b/commands/random-res/coin.js @@ -2,18 +2,18 @@ const Command = require('../../structures/Command'); const sides = ['heads', 'tails']; module.exports = class CoinFlipCommand extends Command { - constructor(client) { - super(client, { - name: 'coin', - aliases: ['coin-flip', 'flip'], - group: 'random-res', - memberName: 'coin', - description: 'Flips a coin.' - }); - } + constructor(client) { + super(client, { + name: 'coin', + aliases: ['coin-flip', 'flip'], + group: 'random-res', + memberName: 'coin', + description: 'Flips a coin.' + }); + } - run(msg) { - const side = sides[Math.floor(Math.random() * sides.length)]; - return msg.say(`It landed on ${side}!`); - } + run(msg) { + const side = sides[Math.floor(Math.random() * sides.length)]; + return msg.say(`It landed on ${side}!`); + } }; diff --git a/commands/random-res/compliment.js b/commands/random-res/compliment.js index 46054acb..70b30f81 100644 --- a/commands/random-res/compliment.js +++ b/commands/random-res/compliment.js @@ -2,26 +2,26 @@ const Command = require('../../structures/Command'); const compliments = require('../../assets/json/compliment'); module.exports = class ComplimentCommand extends Command { - constructor(client) { - super(client, { - name: 'compliment', - group: 'random-res', - memberName: 'compliment', - description: 'Compliments a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to compliment?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'compliment', + group: 'random-res', + memberName: 'compliment', + description: 'Compliments a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to compliment?', + type: 'user', + default: '' + } + ] + }); + } - run(msg, args) { - const user = args.user || msg.author; - const compliment = compliments[Math.floor(Math.random() * compliments.length)]; - return msg.say(`${user.username}, ${compliment}`); - } + run(msg, args) { + const user = args.user || msg.author; + const compliment = compliments[Math.floor(Math.random() * compliments.length)]; + return msg.say(`${user.username}, ${compliment}`); + } }; diff --git a/commands/random-res/fact-core.js b/commands/random-res/fact-core.js index cad60bbb..f155f193 100644 --- a/commands/random-res/fact-core.js +++ b/commands/random-res/fact-core.js @@ -2,17 +2,17 @@ const Command = require('../../structures/Command'); const facts = require('../../assets/json/fact-core'); module.exports = class FactCoreCommand extends Command { - constructor(client) { - super(client, { - name: 'fact-core', - group: 'random-res', - memberName: 'fact-core', - description: 'Responds with a random Fact Core quote.' - }); - } + constructor(client) { + super(client, { + name: 'fact-core', + group: 'random-res', + memberName: 'fact-core', + description: 'Responds with a random Fact Core quote.' + }); + } - run(msg) { - const fact = facts[Math.floor(Math.random() * facts.length)]; - return msg.say(fact); - } + run(msg) { + const fact = facts[Math.floor(Math.random() * facts.length)]; + return msg.say(fact); + } }; diff --git a/commands/random-res/fortune.js b/commands/random-res/fortune.js index 0db31e52..cb563bce 100644 --- a/commands/random-res/fortune.js +++ b/commands/random-res/fortune.js @@ -2,18 +2,18 @@ const Command = require('../../structures/Command'); const fortunes = require('../../assets/json/fortune'); module.exports = class FortuneCommand extends Command { - constructor(client) { - super(client, { - name: 'fortune', - aliases: ['fortune-cookie'], - group: 'random-res', - memberName: 'fortune', - description: 'Responds with a random fortune.' - }); - } + constructor(client) { + super(client, { + name: 'fortune', + aliases: ['fortune-cookie'], + group: 'random-res', + memberName: 'fortune', + description: 'Responds with a random fortune.' + }); + } - run(msg) { - const fortune = fortunes[Math.floor(Math.random() * fortunes.length)]; - return msg.say(fortune); - } + run(msg) { + const fortune = fortunes[Math.floor(Math.random() * fortunes.length)]; + return msg.say(fortune); + } }; diff --git a/commands/random-res/magic-conch.js b/commands/random-res/magic-conch.js index 74a91041..279883fa 100644 --- a/commands/random-res/magic-conch.js +++ b/commands/random-res/magic-conch.js @@ -3,28 +3,28 @@ const { stripIndents } = require('common-tags'); const answers = require('../../assets/json/magic-conch'); module.exports = class MagicConchCommand extends Command { - constructor(client) { - super(client, { - name: 'magic-conch', - group: 'random-res', - memberName: 'magic-conch', - description: 'Asks your question to the Magic Conch.', - args: [ - { - key: 'question', - prompt: 'What do you want to ask the magic conch?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'magic-conch', + group: 'random-res', + memberName: 'magic-conch', + description: 'Asks your question to the Magic Conch.', + args: [ + { + key: 'question', + prompt: 'What do you want to ask the magic conch?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { question } = args; - const answer = answers[Math.floor(Math.random() * answers.length)]; - return msg.say(stripIndents` - Question: ${question} - :shell: ${answer} :shell: - `); - } + run(msg, args) { + const { question } = args; + const answer = answers[Math.floor(Math.random() * answers.length)]; + return msg.say(stripIndents` + Question: ${question} + :shell: ${answer} :shell: + `); + } }; diff --git a/commands/random-res/name.js b/commands/random-res/name.js index 81886ac4..35190271 100644 --- a/commands/random-res/name.js +++ b/commands/random-res/name.js @@ -2,47 +2,47 @@ const Command = require('../../structures/Command'); const { lastNames, maleNames, femaleNames } = require('../../assets/json/name'); module.exports = class RandomNameCommand extends Command { - constructor(client) { - super(client, { - name: 'name', - group: 'random-res', - memberName: 'name', - description: 'Responds with a random name, with the gender of your choice.', - args: [ - { - key: 'gender', - prompt: 'Which gender do you want to generate a name for?', - type: 'string', - default: 'both', - validate: (gender) => { - if (['male', 'female', 'both'].includes(gender.toLowerCase())) return true; - else return 'Please enter either male, female, or both.'; - }, - parse: (gender) => gender.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'name', + group: 'random-res', + memberName: 'name', + description: 'Responds with a random name, with the gender of your choice.', + args: [ + { + key: 'gender', + prompt: 'Which gender do you want to generate a name for?', + type: 'string', + default: 'both', + validate: gender => { + if (['male', 'female', 'both'].includes(gender.toLowerCase())) return true; + return 'Please enter either male, female, or both.'; + }, + parse: gender => gender.toLowerCase() + } + ] + }); + } - run(msg, args) { // eslint-disable-line consistent-return - const { gender } = args; - const lastName = lastNames[Math.floor(Math.random() * lastNames.length)]; - if (gender === 'male') { - const name = maleNames[Math.floor(Math.random() * maleNames.length)]; - return msg.say(`${name} ${lastName}`); - } else if (gender === 'female') { - const name = femaleNames[Math.floor(Math.random() * femaleNames.length)]; - return msg.say(`${name} ${lastName}`); - } else if (gender === 'both') { - const genders = ['male', 'female']; - const randomGender = genders[Math.floor(Math.random() * genders.length)]; - if (randomGender === 'male') { - const name = maleNames[Math.floor(Math.random() * maleNames.length)]; - return msg.say(`${name} ${lastName}`); - } else if (randomGender === 'female') { - const name = femaleNames[Math.floor(Math.random() * femaleNames.length)]; - return msg.say(`${name} ${lastName}`); - } - } - } + run(msg, args) { // eslint-disable-line consistent-return + const { gender } = args; + const lastName = lastNames[Math.floor(Math.random() * lastNames.length)]; + if (gender === 'male') { + const name = maleNames[Math.floor(Math.random() * maleNames.length)]; + return msg.say(`${name} ${lastName}`); + } else if (gender === 'female') { + const name = femaleNames[Math.floor(Math.random() * femaleNames.length)]; + return msg.say(`${name} ${lastName}`); + } else if (gender === 'both') { + const genders = ['male', 'female']; + const randomGender = genders[Math.floor(Math.random() * genders.length)]; + if (randomGender === 'male') { + const name = maleNames[Math.floor(Math.random() * maleNames.length)]; + return msg.say(`${name} ${lastName}`); + } else if (randomGender === 'female') { + const name = femaleNames[Math.floor(Math.random() * femaleNames.length)]; + return msg.say(`${name} ${lastName}`); + } + } + } }; diff --git a/commands/random-res/offspring.js b/commands/random-res/offspring.js index 4bb349ce..fed15cad 100644 --- a/commands/random-res/offspring.js +++ b/commands/random-res/offspring.js @@ -2,17 +2,17 @@ const Command = require('../../structures/Command'); const genders = ['boy', 'girl']; module.exports = class OffspringCommand extends Command { - constructor(client) { - super(client, { - name: 'offspring', - group: 'random-res', - memberName: 'offspring', - description: 'Decides if your new child will be a boy or a girl.' - }); - } + constructor(client) { + super(client, { + name: 'offspring', + group: 'random-res', + memberName: 'offspring', + description: 'Decides if your new child will be a boy or a girl.' + }); + } - run(msg) { - const gender = genders[Math.floor(Math.random() * genders.length)]; - return msg.say(`It's a ${gender}!`); - } + run(msg) { + const gender = genders[Math.floor(Math.random() * genders.length)]; + return msg.say(`It's a ${gender}!`); + } }; diff --git a/commands/random-res/quantum-coin.js b/commands/random-res/quantum-coin.js index 36d69995..c5ed241f 100644 --- a/commands/random-res/quantum-coin.js +++ b/commands/random-res/quantum-coin.js @@ -2,18 +2,18 @@ const Command = require('../../structures/Command'); const sides = ['on nothing', 'on NaN', 'on 0', 'in the air', 'on null']; module.exports = class QuantumCoinCommand extends Command { - constructor(client) { - super(client, { - name: 'quantum-coin', - aliases: ['q-coin'], - group: 'random-res', - memberName: 'quantum-coin', - description: 'Flips a coin that lands on some form of nothing.' - }); - } + constructor(client) { + super(client, { + name: 'quantum-coin', + aliases: ['q-coin'], + group: 'random-res', + memberName: 'quantum-coin', + description: 'Flips a coin that lands on some form of nothing.' + }); + } - run(msg) { - const side = sides[Math.floor(Math.random() * sides.length)]; - return msg.say(`It landed ${side}.`); - } + run(msg) { + const side = sides[Math.floor(Math.random() * sides.length)]; + return msg.say(`It landed ${side}.`); + } }; diff --git a/commands/random-res/quote.js b/commands/random-res/quote.js index b1e8cb96..75e90552 100644 --- a/commands/random-res/quote.js +++ b/commands/random-res/quote.js @@ -3,23 +3,23 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class QuoteCommand extends Command { - constructor(client) { - super(client, { - name: 'quote', - group: 'random-res', - memberName: 'quote', - description: 'Responds with a random quote.', - clientPermissions: ['EMBED_LINKS'] - }); - } + constructor(client) { + super(client, { + name: 'quote', + group: 'random-res', + memberName: 'quote', + description: 'Responds with a random quote.', + clientPermissions: ['EMBED_LINKS'] + }); + } - async run(msg) { - const { body } = await snekfetch - .get('https://talaikis.com/api/quotes/random/'); - const embed = new MessageEmbed() - .setColor(0x9797FF) - .setAuthor(body.author) - .setDescription(body.quote); - return msg.embed(embed); - } + async run(msg) { + const { body } = await snekfetch + .get('https://talaikis.com/api/quotes/random/'); + const embed = new MessageEmbed() + .setColor(0x9797FF) + .setAuthor(body.author) + .setDescription(body.quote); + return msg.embed(embed); + } }; diff --git a/commands/random-res/rate-waifu.js b/commands/random-res/rate-waifu.js index d8f05af2..c0878d8f 100644 --- a/commands/random-res/rate-waifu.js +++ b/commands/random-res/rate-waifu.js @@ -1,26 +1,26 @@ const Command = require('../../structures/Command'); module.exports = class RateWaifuCommand extends Command { - constructor(client) { - super(client, { - name: 'rate-waifu', - aliases: ['waifu'], - group: 'random-res', - memberName: 'rate-waifu', - description: 'Rates your waifu.', - args: [ - { - key: 'waifu', - prompt: 'Who do you want to rate?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'rate-waifu', + aliases: ['waifu'], + group: 'random-res', + memberName: 'rate-waifu', + description: 'Rates your waifu.', + args: [ + { + key: 'waifu', + prompt: 'Who do you want to rate?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { waifu } = args; - const rating = Math.floor(Math.random() * 10) + 1; - return msg.say(`I'd give ${waifu} a ${rating}/10!`); - } + run(msg, args) { + const { waifu } = args; + const rating = Math.floor(Math.random() * 10) + 1; + return msg.say(`I'd give ${waifu} a ${rating}/10!`); + } }; diff --git a/commands/random-res/roast.js b/commands/random-res/roast.js index c4694191..d1cc703b 100644 --- a/commands/random-res/roast.js +++ b/commands/random-res/roast.js @@ -2,26 +2,26 @@ const Command = require('../../structures/Command'); const roasts = require('../../assets/json/roast'); module.exports = class RoastCommand extends Command { - constructor(client) { - super(client, { - name: 'roast', - group: 'random-res', - memberName: 'roast', - description: 'Roasts a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roast?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'roast', + group: 'random-res', + memberName: 'roast', + description: 'Roasts a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roast?', + type: 'user', + default: '' + } + ] + }); + } - run(msg, args) { - const user = args.user || msg.author; - const roast = roasts[Math.floor(Math.random() * roasts.length)]; - return msg.say(`${user.username}, ${roast}`); - } + run(msg, args) { + const user = args.user || msg.author; + const roast = roasts[Math.floor(Math.random() * roasts.length)]; + return msg.say(`${user.username}, ${roast}`); + } }; diff --git a/commands/random-res/roll.js b/commands/random-res/roll.js index 0f1bf173..f23b7674 100644 --- a/commands/random-res/roll.js +++ b/commands/random-res/roll.js @@ -1,28 +1,28 @@ const Command = require('../../structures/Command'); module.exports = class RollCommand extends Command { - constructor(client) { - super(client, { - name: 'roll', - aliases: ['dice'], - group: 'random-res', - memberName: 'roll', - description: 'Rolls a dice with a maximum value of your choice.', - args: [ - { - key: 'value', - label: 'maximum number', - prompt: 'What is the maximum number you wish to appear?', - type: 'integer', - default: 6 - } - ] - }); - } + constructor(client) { + super(client, { + name: 'roll', + aliases: ['dice'], + group: 'random-res', + memberName: 'roll', + description: 'Rolls a dice with a maximum value of your choice.', + args: [ + { + key: 'value', + label: 'maximum number', + prompt: 'What is the maximum number you wish to appear?', + type: 'integer', + default: 6 + } + ] + }); + } - run(msg, args) { - const { value } = args; - const roll = Math.floor(Math.random() * value) + 1; - return msg.say(`You rolled a ${roll}.`); - } + run(msg, args) { + const { value } = args; + const roll = Math.floor(Math.random() * value) + 1; + return msg.say(`You rolled a ${roll}.`); + } }; diff --git a/commands/random-res/roulette.js b/commands/random-res/roulette.js index fafc8b08..ce062ead 100644 --- a/commands/random-res/roulette.js +++ b/commands/random-res/roulette.js @@ -1,17 +1,17 @@ const Command = require('../../structures/Command'); module.exports = class RouletteCommand extends Command { - constructor(client) { - super(client, { - name: 'roulette', - group: 'random-res', - memberName: 'roulette', - description: 'Chooses a random member of the server.', - guildOnly: true - }); - } + constructor(client) { + super(client, { + name: 'roulette', + group: 'random-res', + memberName: 'roulette', + description: 'Chooses a random member of the server.', + guildOnly: true + }); + } - run(msg) { - return msg.say(`I choose ${msg.guild.members.random().displayName}!`); - } + run(msg) { + return msg.say(`I choose ${msg.guild.members.random().displayName}!`); + } }; diff --git a/commands/random-res/ship.js b/commands/random-res/ship.js index 4148a9e9..529f92d9 100644 --- a/commands/random-res/ship.js +++ b/commands/random-res/ship.js @@ -1,27 +1,27 @@ const Command = require('../../structures/Command'); module.exports = class ShipCommand extends Command { - constructor(client) { - super(client, { - name: 'ship', - group: 'random-res', - memberName: 'ship', - description: 'Ships things/people together.', - args: [ - { - key: 'things', - prompt: 'What do you want to ship together?', - type: 'string', - infinite: true - } - ] - }); - } + constructor(client) { + super(client, { + name: 'ship', + group: 'random-res', + memberName: 'ship', + description: 'Ships things/people together.', + args: [ + { + key: 'things', + prompt: 'What do you want to ship together?', + type: 'string', + infinite: true + } + ] + }); + } - run(msg, args) { - const { things } = args; - const rating = Math.floor(Math.random() * 100) + 1; - const list = `${things.slice(0, -1).join(', ')}${things.length > 1 ? ' and ' : ''}${things.slice(-1)}`; - return msg.say(`I'd give ${list} a ${rating}%!`); - } + run(msg, args) { + const { things } = args; + const rating = Math.floor(Math.random() * 100) + 1; + const list = `${things.slice(0, -1).join(', ')}${things.length > 1 ? ' and ' : ''}${things.slice(-1)}`; + return msg.say(`I'd give ${list} a ${rating}%!`); + } }; diff --git a/commands/random-res/today.js b/commands/random-res/today.js index b51c42cc..7e887fb3 100644 --- a/commands/random-res/today.js +++ b/commands/random-res/today.js @@ -3,56 +3,56 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class TodayCommand extends Command { - constructor(client) { - super(client, { - name: 'today', - aliases: ['event', 'history'], - group: 'random-res', - memberName: 'today', - description: 'Responds with an event that occurred today in history, or on a specific day.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'month', - prompt: 'Which month do you want events for?', - type: 'integer', - default: '', - validate: (month) => { - if (month < 13 && month > 0) return true; - else return 'Please enter a valid month.'; - } - }, - { - key: 'day', - prompt: 'Which day do you want events for?', - type: 'integer', - default: '', - validate: (day) => { - if (day < 32 && day > 0) return true; - else return 'Please enter a valid day.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'today', + aliases: ['event', 'history'], + group: 'random-res', + memberName: 'today', + description: 'Responds with an event that occurred today in history, or on a specific day.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'month', + prompt: 'Which month do you want events for?', + type: 'integer', + default: '', + validate: month => { + if (month < 13 && month > 0) return true; + return 'Please enter a valid month.'; + } + }, + { + key: 'day', + prompt: 'Which day do you want events for?', + type: 'integer', + default: '', + validate: day => { + if (day < 32 && day > 0) return true; + return 'Please enter a valid day.'; + } + } + ] + }); + } - async run(msg, args) { - const { month, day } = args; - try { - const { text } = await snekfetch - .get(`http://history.muffinlabs.com/date${month && day ? `/${month}/${day}` : ''}`); - const body = JSON.parse(text); - const events = body.data.Events; - const event = events[Math.floor(Math.random() * events.length)]; - const embed = new MessageEmbed() - .setColor(0x9797FF) - .setURL(body.url) - .setTitle(`On this day (${body.date})...`) - .setTimestamp() - .setDescription(`${event.year}: ${event.text}`); - return msg.embed(embed); - } catch (err) { - return msg.say(`An error occurred: \`${err.message}\`. You likely entered an invalid date.`); - } - } + async run(msg, args) { + const { month, day } = args; + try { + const { text } = await snekfetch + .get(`http://history.muffinlabs.com/date${month && day ? `/${month}/${day}` : ''}`); + const body = JSON.parse(text); + const events = body.data.Events; + const event = events[Math.floor(Math.random() * events.length)]; + const embed = new MessageEmbed() + .setColor(0x9797FF) + .setURL(body.url) + .setTitle(`On this day (${body.date})...`) + .setTimestamp() + .setDescription(`${event.year}: ${event.text}`); + return msg.embed(embed); + } catch (err) { + return msg.say(`An error occurred: \`${err.message}\`. You likely entered an invalid date.`); + } + } }; diff --git a/commands/random-res/vocaloid.js b/commands/random-res/vocaloid.js index f0d91937..4b36d41c 100644 --- a/commands/random-res/vocaloid.js +++ b/commands/random-res/vocaloid.js @@ -2,17 +2,17 @@ const Command = require('../../structures/Command'); const songs = require('../../assets/json/vocaloid'); module.exports = class VocaloidCommand extends Command { - constructor(client) { - super(client, { - name: 'vocaloid', - group: 'random-res', - memberName: 'vocaloid', - description: 'Responds with a random VOCALOID song.' - }); - } + constructor(client) { + super(client, { + name: 'vocaloid', + group: 'random-res', + memberName: 'vocaloid', + description: 'Responds with a random VOCALOID song.' + }); + } - run(msg) { - const song = songs[Math.floor(Math.random() * songs.length)]; - return msg.say(song); - } + run(msg) { + const song = songs[Math.floor(Math.random() * songs.length)]; + return msg.say(song); + } }; diff --git a/commands/random-res/would-you-rather.js b/commands/random-res/would-you-rather.js index 7ab00482..072bcc08 100644 --- a/commands/random-res/would-you-rather.js +++ b/commands/random-res/would-you-rather.js @@ -3,25 +3,25 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class WouldYouRatherCommand extends Command { - constructor(client) { - super(client, { - name: 'would-you-rather', - aliases: ['wy-rather'], - group: 'random-res', - memberName: 'would-you-rather', - description: 'Responds with a random would you rather question.', - clientPermissions: ['EMBED_LINKS'] - }); - } + constructor(client) { + super(client, { + name: 'would-you-rather', + aliases: ['wy-rather'], + group: 'random-res', + memberName: 'would-you-rather', + description: 'Responds with a random would you rather question.', + clientPermissions: ['EMBED_LINKS'] + }); + } - async run(msg) { - const { body } = await snekfetch - .get('http://www.rrrather.com/botapi'); - const embed = new MessageEmbed() - .setTitle(`${body.title}...`) - .setURL(body.link) - .setColor(0x9797FF) - .setDescription(`${body.choicea} OR ${body.choiceb}?`); - return msg.embed(embed); - } + async run(msg) { + const { body } = await snekfetch + .get('http://www.rrrather.com/botapi'); + const embed = new MessageEmbed() + .setTitle(`${body.title}...`) + .setURL(body.link) + .setColor(0x9797FF) + .setDescription(`${body.choicea} OR ${body.choiceb}?`); + return msg.embed(embed); + } }; diff --git a/commands/random/easter-egg.js b/commands/random/easter-egg.js index 6ad580e3..5b9335cc 100644 --- a/commands/random/easter-egg.js +++ b/commands/random/easter-egg.js @@ -2,30 +2,30 @@ const Command = require('../../structures/Command'); const eastereggs = require('../../assets/json/easter-egg'); module.exports = class EasterEggCommand extends Command { - constructor(client) { - super(client, { - name: 'easter-egg', - aliases: ['tag'], - group: 'random', - memberName: 'easter-egg', - 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; - else return 'Nope, that\'s not a valid easter egg. Try again!'; - }, - parse: (tag) => tag.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'easter-egg', + aliases: ['tag'], + group: 'random', + memberName: 'easter-egg', + 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() + } + ] + }); + } - run(msg, args) { - const { tag } = args; - return msg.say(eastereggs[tag]); - } + run(msg, args) { + const { tag } = args; + return msg.say(eastereggs[tag]); + } }; diff --git a/commands/random/give-flower.js b/commands/random/give-flower.js index 14d6e14d..05e452ef 100644 --- a/commands/random/give-flower.js +++ b/commands/random/give-flower.js @@ -1,16 +1,16 @@ const Command = require('../../structures/Command'); module.exports = class GiveFlowerCommand extends Command { - constructor(client) { - super(client, { - name: 'give-flower', - group: 'random', - memberName: 'give-flower', - description: 'Gives Xiao Pai a flower.' - }); - } + constructor(client) { + super(client, { + name: 'give-flower', + group: 'random', + memberName: 'give-flower', + description: 'Gives Xiao Pai a flower.' + }); + } - run(msg) { - return msg.say('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪'); - } + run(msg) { + return msg.say('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪'); + } }; diff --git a/commands/random/horoscope.js b/commands/random/horoscope.js index 9c34166a..58d5d080 100644 --- a/commands/random/horoscope.js +++ b/commands/random/horoscope.js @@ -4,45 +4,45 @@ const snekfetch = require('snekfetch'); const signs = require('../../assets/json/horoscope'); module.exports = class HoroscopeCommand extends Command { - constructor(client) { - super(client, { - name: 'horoscope', - group: 'random', - memberName: 'horoscope', - description: 'Responds with today\'s horoscope for a particular sign.', - details: `**Signs:** ${signs.join(', ')}`, - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'sign', - prompt: 'Which sign would you like to get the horoscope for?', - type: 'string', - validate: (sign) => { - if (signs.includes(sign.toLowerCase())) return true; - else return 'Invalid sign. Use `help horoscope` for a list of signs.'; - }, - parse: (sign) => sign.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'horoscope', + group: 'random', + memberName: 'horoscope', + description: 'Responds with today\'s horoscope for a particular sign.', + details: `**Signs:** ${signs.join(', ')}`, + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'sign', + prompt: 'Which sign would you like to get the horoscope for?', + type: 'string', + validate: sign => { + if (signs.includes(sign.toLowerCase())) return true; + return 'Invalid sign. Use `help horoscope` for a list of signs.'; + }, + parse: sign => sign.toLowerCase() + } + ] + }); + } - async run(msg, args) { - const { sign } = args; - const { text } = await snekfetch - .get(`http://sandipbgt.com/theastrologer/api/horoscope/${sign}/today`); - const body = JSON.parse(text); - const embed = new MessageEmbed() - .setColor(0x9797FF) - .setTitle(`Horoscope for ${body.sunsign}...`) - .setTimestamp() - .setDescription(body.horoscope) - .addField('Mood', - body.meta.mood, true) - .addField('Intensity', - body.meta.intensity, true) - .addField('Date', - body.date, true); - return msg.embed(embed); - } + async run(msg, args) { + const { sign } = args; + const { text } = await snekfetch + .get(`http://sandipbgt.com/theastrologer/api/horoscope/${sign}/today`); + const body = JSON.parse(text); + const embed = new MessageEmbed() + .setColor(0x9797FF) + .setTitle(`Horoscope for ${body.sunsign}...`) + .setTimestamp() + .setDescription(body.horoscope) + .addField('Mood', + body.meta.mood, true) + .addField('Intensity', + body.meta.intensity, true) + .addField('Date', + body.date, true); + return msg.embed(embed); + } }; diff --git a/commands/random/lenny.js b/commands/random/lenny.js index 5e6a72e5..85f66fe4 100644 --- a/commands/random/lenny.js +++ b/commands/random/lenny.js @@ -1,16 +1,16 @@ const Command = require('../../structures/Command'); module.exports = class LennyCommand extends Command { - constructor(client) { - super(client, { - name: 'lenny', - group: 'random', - memberName: 'lenny', - description: 'Responds with the lenny face.' - }); - } + constructor(client) { + super(client, { + name: 'lenny', + group: 'random', + memberName: 'lenny', + description: 'Responds with the lenny face.' + }); + } - run(msg) { - return msg.say('( ͡° ͜ʖ ͡°)'); - } + run(msg) { + return msg.say('( ͡° ͜ʖ ͡°)'); + } }; diff --git a/commands/random/lmgtfy.js b/commands/random/lmgtfy.js index 44d738a5..316740ba 100644 --- a/commands/random/lmgtfy.js +++ b/commands/random/lmgtfy.js @@ -1,25 +1,25 @@ const Command = require('../../structures/Command'); module.exports = class LMGTFYCommand extends Command { - constructor(client) { - super(client, { - name: 'lmgtfy', - group: 'random', - memberName: 'lmgtfy', - description: 'Creates a LMGTFY link with the query you provide.', - args: [ - { - key: 'query', - prompt: 'What would you like the link to search for?', - type: 'string', - parse: (query) => encodeURIComponent(query) - } - ] - }); - } + constructor(client) { + super(client, { + name: 'lmgtfy', + group: 'random', + memberName: 'lmgtfy', + description: 'Creates a LMGTFY link with the query you provide.', + args: [ + { + key: 'query', + prompt: 'What would you like the link to search for?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] + }); + } - run(msg, args) { - const { query } = args; - return msg.say(`http://lmgtfy.com/?iie=1&q=${query}`); - } + run(msg, args) { + const { query } = args; + return msg.say(`http://lmgtfy.com/?iie=1&q=${query}`); + } }; diff --git a/commands/random/portal-send.js b/commands/random/portal-send.js index 7aef34e8..1f2a8dd5 100644 --- a/commands/random/portal-send.js +++ b/commands/random/portal-send.js @@ -1,41 +1,41 @@ const Command = require('../../structures/Command'); module.exports = class PortalSendCommand extends Command { - constructor(client) { - super(client, { - name: 'portal-send', - group: 'random', - memberName: 'portal-send', - description: 'Send a message to a random channel that has a portal open.', - guildOnly: true, - args: [ - { - key: 'message', - prompt: 'What message do you want to send?', - type: 'string', - validate: (message) => { - if (message.length > 1500) return 'Message must be under 1500 characters.'; - else if (!/(discord(\.gg\/|app\.com\/invite\/|\.me\/))/gi.test(message)) return true; - else return 'Please do not send invites.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'portal-send', + group: 'random', + memberName: 'portal-send', + description: 'Send a message to a random channel that has a portal open.', + guildOnly: true, + args: [ + { + key: 'message', + prompt: 'What message do you want to send?', + type: 'string', + validate: message => { + if (message.length > 1500) return 'Message must be under 1500 characters.'; + if (!/discord(\.gg\/|app\.com\/invite\/|\.me\/)/gi.test(message)) return true; + return 'Please do not send invites.'; + } + } + ] + }); + } - async run(msg, args) { - const { message } = args; - const channel = this.client.channels.filter((c) => { - if (c.type !== 'text' || !c.topic || msg.guild.id === c.guild.id) return false; - else if (c.topic.includes('')) return true; - else return false; - }).random(); - if (!channel) return msg.say('Aww... No channel has an open portal...'); - try { - await channel.send(`**${msg.author.tag} (${msg.guild.name}):** ${message}`); - return msg.say(`Message sent to **${channel.guild.name}**!`); - } catch (err) { - return msg.say('Failed to send message...'); - } - } + async run(msg, args) { + const { message } = args; + const channel = this.client.channels.filter(c => { + if (c.type !== 'text' || !c.topic || msg.guild.id === c.guild.id) return false; + else if (c.topic.includes('')) return true; + return false; + }).random(); + if (!channel) return msg.say('Aww... No channel has an open portal...'); + try { + await channel.send(`**${msg.author.tag} (${msg.guild.name}):** ${message}`); + return msg.say(`Message sent to **${channel.guild.name}**!`); + } catch (err) { + return msg.say('Failed to send message...'); + } + } }; diff --git a/commands/random/spam.js b/commands/random/spam.js index 5a9599aa..366ee1b9 100644 --- a/commands/random/spam.js +++ b/commands/random/spam.js @@ -1,17 +1,17 @@ const Command = require('../../structures/Command'); module.exports = class SpamCommand extends Command { - constructor(client) { - super(client, { - name: 'spam', - group: 'random', - memberName: 'spam', - description: 'Responds with a picture of Spam.', - clientPermissions: ['ATTACH_FILES'] - }); - } + constructor(client) { + super(client, { + name: 'spam', + group: 'random', + memberName: 'spam', + description: 'Responds with a picture of Spam.', + clientPermissions: ['ATTACH_FILES'] + }); + } - run(msg) { - return msg.say({ files: ['https://i.imgur.com/arx7GJV.jpg'] }); - } + run(msg) { + return msg.say({ files: ['https://i.imgur.com/arx7GJV.jpg'] }); + } }; diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index 60a44239..f0b82063 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -3,46 +3,46 @@ const { stripIndents } = require('common-tags'); const snekfetch = require('snekfetch'); module.exports = class StrawpollCommand extends Command { - constructor(client) { - super(client, { - name: 'strawpoll', - group: 'random', - memberName: 'strawpoll', - description: 'Creates a Strawpoll from the options you provide.', - 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; - else return 'Title must be under 200 characters.'; - } - }, - { - key: 'options', - prompt: 'What options do you want to be able to pick from? Maximum of 30.', - type: 'string', - infinite: true, - validate: (choice) => { - if (choice.length < 140) return true; - else return 'Choices must be under 140 characters each.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'strawpoll', + group: 'random', + memberName: 'strawpoll', + description: 'Creates a Strawpoll from the options you provide.', + 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 'Title must be under 200 characters.'; + } + }, + { + key: 'options', + prompt: 'What options do you want to be able to pick from? Maximum of 30.', + type: 'string', + infinite: true, + validate: choice => { + if (choice.length < 140) return true; + return 'Choices must be under 140 characters each.'; + } + } + ] + }); + } - async run(msg, args) { - const { title, options } = args; - if (options.length < 2) return msg.say('You provided less than two choices.'); - if (options.length > 31) return msg.say('You provided more than thirty choices.'); - const { body } = await snekfetch - .post('https://strawpoll.me/api/v2/polls') - .send({ title, options }); - return msg.say(stripIndents` - ${body.title} - http://strawpoll.me/${body.id} - `); - } + async run(msg, args) { + const { title, options } = args; + if (options.length < 2) return msg.say('You provided less than two choices.'); + if (options.length > 31) return msg.say('You provided more than thirty choices.'); + const { body } = await snekfetch + .post('https://strawpoll.me/api/v2/polls') + .send({ title, options }); + return msg.say(stripIndents` + ${body.title} + http://strawpoll.me/${body.id} + `); + } }; diff --git a/commands/random/xkcd.js b/commands/random/xkcd.js index daa814e5..6e062119 100644 --- a/commands/random/xkcd.js +++ b/commands/random/xkcd.js @@ -3,58 +3,58 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class XKCDCommand extends Command { - constructor(client) { - super(client, { - name: 'xkcd', - aliases: ['kcd'], - group: 'random', - memberName: 'xkcd', - description: 'Gets an XKCD Comic, optionally opting for today\'s or a specific number.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'type', - prompt: 'Please enter either a specific comic number, today, or random.', - type: 'string', - default: 'random', - parse: (type) => type.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'xkcd', + aliases: ['kcd'], + group: 'random', + memberName: 'xkcd', + description: 'Gets an XKCD Comic, optionally opting for today\'s or a specific number.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'type', + prompt: 'Please enter either a specific comic number, today, or random.', + type: 'string', + default: 'random', + parse: type => type.toLowerCase() + } + ] + }); + } - async run(msg, args) { - const { type } = args; - const current = await snekfetch - .get('https://xkcd.com/info.0.json'); - if (type === 'today') { - const embed = new MessageEmbed() - .setTitle(`${current.body.num} - ${current.body.title}`) - .setURL(`https://xkcd.com/${current.body.num}`) - .setImage(current.body.img) - .setFooter(current.body.alt); - return msg.embed(embed); - } else if (type === 'random') { - const random = Math.floor(Math.random() * current.body.num) + 1; - const { body } = await snekfetch - .get(`https://xkcd.com/${random}/info.0.json`); - const embed = new MessageEmbed() - .setTitle(`${body.num} - ${body.title}`) - .setURL(`https://xkcd.com/${body.num}`) - .setImage(body.img) - .setFooter(body.alt); - return msg.embed(embed); - } else { - const choice = parseInt(type, 10); - if (isNaN(choice) || current.body.num < choice || choice < 1) return msg.say('Invalid Number.'); - const { body } = await snekfetch - .get(`https://xkcd.com/${choice}/info.0.json`); - const embed = new MessageEmbed() - .setTitle(`${body.num} - ${body.title}`) - .setURL(`https://xkcd.com/${body.num}`) - .setImage(body.img) - .setFooter(body.alt); - return msg.embed(embed); - } - } + async run(msg, args) { + const { type } = args; + const current = await snekfetch + .get('https://xkcd.com/info.0.json'); + if (type === 'today') { + const embed = new MessageEmbed() + .setTitle(`${current.body.num} - ${current.body.title}`) + .setURL(`https://xkcd.com/${current.body.num}`) + .setImage(current.body.img) + .setFooter(current.body.alt); + return msg.embed(embed); + } else if (type === 'random') { + const random = Math.floor(Math.random() * current.body.num) + 1; + const { body } = await snekfetch + .get(`https://xkcd.com/${random}/info.0.json`); + const embed = new MessageEmbed() + .setTitle(`${body.num} - ${body.title}`) + .setURL(`https://xkcd.com/${body.num}`) + .setImage(body.img) + .setFooter(body.alt); + return msg.embed(embed); + } else { + const choice = parseInt(type, 10); + if (isNaN(choice) || current.body.num < choice || choice < 1) return msg.say('Invalid Number.'); + const { body } = await snekfetch + .get(`https://xkcd.com/${choice}/info.0.json`); + const embed = new MessageEmbed() + .setTitle(`${body.num} - ${body.title}`) + .setURL(`https://xkcd.com/${body.num}`) + .setImage(body.img) + .setFooter(body.alt); + return msg.embed(embed); + } + } }; diff --git a/commands/roleplay/cuddle.js b/commands/roleplay/cuddle.js index 437d360e..8f7941d9 100644 --- a/commands/roleplay/cuddle.js +++ b/commands/roleplay/cuddle.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class CuddleCommand extends Command { - constructor(client) { - super(client, { - name: 'cuddle', - group: 'roleplay', - memberName: 'cuddle', - description: 'Cuddles a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'cuddle', + group: 'roleplay', + memberName: 'cuddle', + description: 'Cuddles a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *cuddles* **${user.username}** - https://i.imgur.com/0yAIWbg.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *cuddles* **${user.username}** + https://i.imgur.com/0yAIWbg.gif + `); + } }; diff --git a/commands/roleplay/divorce.js b/commands/roleplay/divorce.js index 04b7733b..2e2fc7ec 100644 --- a/commands/roleplay/divorce.js +++ b/commands/roleplay/divorce.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class DivorceCommand extends Command { - constructor(client) { - super(client, { - name: 'divorce', - group: 'roleplay', - memberName: 'divorce', - description: 'Divorces a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'divorce', + group: 'roleplay', + memberName: 'divorce', + description: 'Divorces a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *divorces* **${user.username}** - https://i.imgur.com/IgvLWaa.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *divorces* **${user.username}** + https://i.imgur.com/IgvLWaa.gif + `); + } }; diff --git a/commands/roleplay/eat.js b/commands/roleplay/eat.js index 2ce1256a..49d8f3f0 100644 --- a/commands/roleplay/eat.js +++ b/commands/roleplay/eat.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class EatCommand extends Command { - constructor(client) { - super(client, { - name: 'eat', - group: 'roleplay', - memberName: 'eat', - description: 'Eats a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'eat', + group: 'roleplay', + memberName: 'eat', + description: 'Eats a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *eats* **${user.username}** - https://i.imgur.com/O7FQ5kz.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *eats* **${user.username}** + https://i.imgur.com/O7FQ5kz.gif + `); + } }; diff --git a/commands/roleplay/falcon-punch.js b/commands/roleplay/falcon-punch.js index 70c05e0e..94c9645a 100644 --- a/commands/roleplay/falcon-punch.js +++ b/commands/roleplay/falcon-punch.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class FalconPunchCommand extends Command { - constructor(client) { - super(client, { - name: 'falcon-punch', - group: 'roleplay', - memberName: 'falcon-punch', - description: 'Falcon Punches a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'falcon-punch', + group: 'roleplay', + memberName: 'falcon-punch', + description: 'Falcon Punches a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *falcon punches* **${user.username}** - https://i.imgur.com/LOuK637.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *falcon punches* **${user.username}** + https://i.imgur.com/LOuK637.gif + `); + } }; diff --git a/commands/roleplay/fist-bump.js b/commands/roleplay/fist-bump.js index c5847795..f13b0743 100644 --- a/commands/roleplay/fist-bump.js +++ b/commands/roleplay/fist-bump.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class FistBumpCommand extends Command { - constructor(client) { - super(client, { - name: 'fist-bump', - group: 'roleplay', - memberName: 'fist-bump', - description: 'Fistbumps a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'fist-bump', + group: 'roleplay', + memberName: 'fist-bump', + description: 'Fistbumps a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *fist-bumps* **${user.username}** - *badalalala* https://i.imgur.com/lO2xZHC.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *fist-bumps* **${user.username}** + *badalalala* https://i.imgur.com/lO2xZHC.gif + `); + } }; diff --git a/commands/roleplay/high-five.js b/commands/roleplay/high-five.js index b8d230c6..6a6ac634 100644 --- a/commands/roleplay/high-five.js +++ b/commands/roleplay/high-five.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class HighFivesCommand extends Command { - constructor(client) { - super(client, { - name: 'high-five', - group: 'roleplay', - memberName: 'high-five', - description: 'High Fives a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'high-five', + group: 'roleplay', + memberName: 'high-five', + description: 'High Fives a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *high-fives* **${user.username}** - https://media.giphy.com/media/x58AS8I9DBRgA/giphy.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *high-fives* **${user.username}** + https://media.giphy.com/media/x58AS8I9DBRgA/giphy.gif + `); + } }; diff --git a/commands/roleplay/hit-with-shovel.js b/commands/roleplay/hit-with-shovel.js index 3659495c..77fcd8e2 100644 --- a/commands/roleplay/hit-with-shovel.js +++ b/commands/roleplay/hit-with-shovel.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class HitwithShovelCommand extends Command { - constructor(client) { - super(client, { - name: 'hit-with-shovel', - group: 'roleplay', - memberName: 'hit-with-shovel', - description: 'Hits a user with a shovel.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'hit-with-shovel', + group: 'roleplay', + memberName: 'hit-with-shovel', + description: 'Hits a user with a shovel.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *hits* **${user.username}** *with a shovel* - https://i.imgur.com/4yvqw81.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *hits* **${user.username}** *with a shovel* + https://i.imgur.com/4yvqw81.gif + `); + } }; diff --git a/commands/roleplay/hug.js b/commands/roleplay/hug.js index 8a7f2c62..22fefe7e 100644 --- a/commands/roleplay/hug.js +++ b/commands/roleplay/hug.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class HugCommand extends Command { - constructor(client) { - super(client, { - name: 'hug', - group: 'roleplay', - memberName: 'hug', - description: 'Hugs a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'hug', + group: 'roleplay', + memberName: 'hug', + description: 'Hugs a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *hugs* **${user.username}** - https://i.imgur.com/q9Wkhz4.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *hugs* **${user.username}** + https://i.imgur.com/q9Wkhz4.gif + `); + } }; diff --git a/commands/roleplay/inhale.js b/commands/roleplay/inhale.js index f7b85901..7045e328 100644 --- a/commands/roleplay/inhale.js +++ b/commands/roleplay/inhale.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class InhaleCommand extends Command { - constructor(client) { - super(client, { - name: 'inhale', - group: 'roleplay', - memberName: 'inhale', - description: 'Inhales a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'inhale', + group: 'roleplay', + memberName: 'inhale', + description: 'Inhales a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *inhales* **${user.username}** *but gained no ability...* - https://i.imgur.com/b4NeOXj.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *inhales* **${user.username}** *but gained no ability...* + https://i.imgur.com/b4NeOXj.gif + `); + } }; diff --git a/commands/roleplay/kill.js b/commands/roleplay/kill.js index 0a7565e1..a871e6f7 100644 --- a/commands/roleplay/kill.js +++ b/commands/roleplay/kill.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class KillCommand extends Command { - constructor(client) { - super(client, { - name: 'kill', - group: 'roleplay', - memberName: 'kill', - description: 'Kills a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'kill', + group: 'roleplay', + memberName: 'kill', + description: 'Kills a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *kills* **${user.username}** - https://i.imgur.com/WxD4XMe.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *kills* **${user.username}** + https://i.imgur.com/WxD4XMe.gif + `); + } }; diff --git a/commands/roleplay/kiss.js b/commands/roleplay/kiss.js index 90ffc347..af4df812 100644 --- a/commands/roleplay/kiss.js +++ b/commands/roleplay/kiss.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class KissCommand extends Command { - constructor(client) { - super(client, { - name: 'kiss', - group: 'roleplay', - memberName: 'kiss', - description: 'Kisses a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'kiss', + group: 'roleplay', + memberName: 'kiss', + description: 'Kisses a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *kisses* **${user.username}** - https://i.imgur.com/S7mwPfE.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *kisses* **${user.username}** + https://i.imgur.com/S7mwPfE.gif + `); + } }; diff --git a/commands/roleplay/marry.js b/commands/roleplay/marry.js index e964b955..f0292100 100644 --- a/commands/roleplay/marry.js +++ b/commands/roleplay/marry.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class MarryCommand extends Command { - constructor(client) { - super(client, { - name: 'marry', - group: 'roleplay', - memberName: 'marry', - description: 'Marries a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'marry', + group: 'roleplay', + memberName: 'marry', + description: 'Marries a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *marries* **${user.username}** - https://i.imgur.com/u67QLhB.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *marries* **${user.username}** + https://i.imgur.com/u67QLhB.gif + `); + } }; diff --git a/commands/roleplay/pat.js b/commands/roleplay/pat.js index d5a6c57b..6dcd58f1 100644 --- a/commands/roleplay/pat.js +++ b/commands/roleplay/pat.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class PatCommand extends Command { - constructor(client) { - super(client, { - name: 'pat', - group: 'roleplay', - memberName: 'pat', - description: 'Pats a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'pat', + group: 'roleplay', + memberName: 'pat', + description: 'Pats a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *pats* **${user.username}** - https://i.imgur.com/oynHZmT.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *pats* **${user.username}** + https://i.imgur.com/oynHZmT.gif + `); + } }; diff --git a/commands/roleplay/poke.js b/commands/roleplay/poke.js index 62c1fd29..fe51c67a 100644 --- a/commands/roleplay/poke.js +++ b/commands/roleplay/poke.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class PokeCommand extends Command { - constructor(client) { - super(client, { - name: 'poke', - group: 'roleplay', - memberName: 'poke', - description: 'Pokes a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'poke', + group: 'roleplay', + memberName: 'poke', + description: 'Pokes a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *pokes* **${user.username}** - https://i.imgur.com/XMuJ7K8.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *pokes* **${user.username}** + https://i.imgur.com/XMuJ7K8.gif + `); + } }; diff --git a/commands/roleplay/punch.js b/commands/roleplay/punch.js index cbc7f20d..87d82953 100644 --- a/commands/roleplay/punch.js +++ b/commands/roleplay/punch.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class PunchCommand extends Command { - constructor(client) { - super(client, { - name: 'punch', - group: 'roleplay', - memberName: 'punch', - description: 'Punches a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'punch', + group: 'roleplay', + memberName: 'punch', + description: 'Punches a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *punches* **${user.username}** - https://i.imgur.com/WKj10Dc.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *punches* **${user.username}** + https://i.imgur.com/WKj10Dc.gif + `); + } }; diff --git a/commands/roleplay/slap.js b/commands/roleplay/slap.js index e231e37f..cc186fd3 100644 --- a/commands/roleplay/slap.js +++ b/commands/roleplay/slap.js @@ -2,27 +2,27 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class SlapCommand extends Command { - constructor(client) { - super(client, { - name: 'slap', - group: 'roleplay', - memberName: 'slap', - description: 'Slaps a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'slap', + group: 'roleplay', + memberName: 'slap', + description: 'Slaps a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *slaps* **${user.username}** - https://i.imgur.com/rfy8z2K.gif - `); - } + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *slaps* **${user.username}** + https://i.imgur.com/rfy8z2K.gif + `); + } }; diff --git a/commands/search/anime.js b/commands/search/anime.js index 9dafe7a1..cf5c6d1b 100644 --- a/commands/search/anime.js +++ b/commands/search/anime.js @@ -7,50 +7,50 @@ const xml = promisifyAll(require('xml2js')); const { animelistLogin } = require('../../config'); module.exports = class AnimeCommand extends Command { - constructor(client) { - super(client, { - name: 'anime', - group: 'search', - memberName: 'anime', - description: 'Searches My Anime List for your query, getting anime results.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What anime would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'anime', + group: 'search', + memberName: 'anime', + description: 'Searches My Anime List for your query, getting anime results.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What anime would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - try { - const { text } = await snekfetch - .get(`https://${animelistLogin}@myanimelist.net/api/anime/search.xml`) - .query({ q: query }); - const { anime } = await xml.parseStringAsync(text); - const synopsis = cleanXML(anime.entry[0].synopsis[0].substr(0, 2000)); - const embed = new MessageEmbed() - .setColor(0x2D54A2) - .setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png') - .setURL(`https://myanimelist.net/anime/${anime.entry[0].id[0]}`) - .setThumbnail(anime.entry[0].image[0]) - .setTitle(`${anime.entry[0].title[0]} (English: ${anime.entry[0].english[0] || 'N/A'})`) - .setDescription(synopsis) - .addField('❯ Type', - `${anime.entry[0].type[0]} - ${anime.entry[0].status[0]}`, true) - .addField('❯ Episodes', - anime.entry[0].episodes[0], true) - .addField('❯ Start Date', - anime.entry[0].start_date[0], true) - .addField('❯ End Date', - anime.entry[0].end_date[0], true); - return msg.embed(embed); - } catch (err) { - if (err.message === 'Parse Error') return msg.say('No Results.'); - else throw err; - } - } + async run(msg, args) { + const { query } = args; + try { + const { text } = await snekfetch + .get(`https://${animelistLogin}@myanimelist.net/api/anime/search.xml`) + .query({ q: query }); + const { anime } = await xml.parseStringAsync(text); + const synopsis = cleanXML(anime.entry[0].synopsis[0].substr(0, 2000)); + const embed = new MessageEmbed() + .setColor(0x2D54A2) + .setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png') + .setURL(`https://myanimelist.net/anime/${anime.entry[0].id[0]}`) + .setThumbnail(anime.entry[0].image[0]) + .setTitle(`${anime.entry[0].title[0]} (English: ${anime.entry[0].english[0] || 'N/A'})`) + .setDescription(synopsis) + .addField('❯ Type', + `${anime.entry[0].type[0]} - ${anime.entry[0].status[0]}`, true) + .addField('❯ Episodes', + anime.entry[0].episodes[0], true) + .addField('❯ Start Date', + anime.entry[0].start_date[0], true) + .addField('❯ End Date', + anime.entry[0].end_date[0], true); + return msg.embed(embed); + } catch (err) { + if (err.message === 'Parse Error') return msg.say('No Results.'); + throw err; + } + } }; diff --git a/commands/search/bot-info.js b/commands/search/bot-info.js index 86e2aba4..74529fbf 100644 --- a/commands/search/bot-info.js +++ b/commands/search/bot-info.js @@ -4,45 +4,45 @@ const snekfetch = require('snekfetch'); const { dbotsKey } = require('../../config'); module.exports = class BotSearchCommand extends Command { - constructor(client) { - super(client, { - name: 'bot-info', - group: 'search', - memberName: 'bot-info', - description: 'Searches Discord Bots for info on a bot.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'bot', - prompt: 'Which bot do you want to get information for?', - type: 'user' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'bot-info', + group: 'search', + memberName: 'bot-info', + description: 'Searches Discord Bots for info on a bot.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'bot', + prompt: 'Which bot do you want to get information for?', + type: 'user' + } + ] + }); + } - async run(msg, args) { - const { bot } = args; - try { - const { body } = await snekfetch - .get(`https://bots.discord.pw/api/bots/${bot.id}`) - .set({ Authorization: dbotsKey }); - const embed = new MessageEmbed() - .setColor(0x9797FF) - .setAuthor('Discord Bots', 'https://i.imgur.com/lrKYBQi.jpg') - .setTitle(body.name) - .setURL(`https://bots.discord.pw/bots/${bot.id}`) - .setDescription(body.description) - .addField('❯ Library', - body.library, true) - .addField('❯ Invite', - `[Here](${body.invite_url})`, true) - .addField('❯ Prefix', - body.prefix, true); - return msg.embed(embed); - } catch (err) { - if (err.status === 404) return msg.say('Bot Not Found.'); - else throw err; - } - } + async run(msg, args) { + const { bot } = args; + try { + const { body } = await snekfetch + .get(`https://bots.discord.pw/api/bots/${bot.id}`) + .set({ Authorization: dbotsKey }); + const embed = new MessageEmbed() + .setColor(0x9797FF) + .setAuthor('Discord Bots', 'https://i.imgur.com/lrKYBQi.jpg') + .setTitle(body.name) + .setURL(`https://bots.discord.pw/bots/${bot.id}`) + .setDescription(body.description) + .addField('❯ Library', + body.library, true) + .addField('❯ Invite', + `[Here](${body.invite_url})`, true) + .addField('❯ Prefix', + body.prefix, true); + return msg.embed(embed); + } catch (err) { + if (err.status === 404) return msg.say('Bot Not Found.'); + throw err; + } + } }; diff --git a/commands/search/bulbapedia.js b/commands/search/bulbapedia.js index 3735e27e..7d2f2180 100644 --- a/commands/search/bulbapedia.js +++ b/commands/search/bulbapedia.js @@ -3,44 +3,44 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class BulbapediaCommand extends Command { - constructor(client) { - super(client, { - name: 'bulbapedia', - aliases: ['bulbagarden'], - group: 'search', - memberName: 'bulbapedia', - description: 'Searches Bulbapedia for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'bulbapedia', + aliases: ['bulbagarden'], + group: 'search', + memberName: 'bulbapedia', + description: 'Searches Bulbapedia for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('http://bulbapedia.bulbagarden.net/w/api.php') - .query({ - action: 'query', - prop: 'extracts', - format: 'json', - titles: query, - exintro: '', - explaintext: '', - redirects: '', - formatversion: 2 - }); - if (body.query.pages[0].missing) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0x3E7614) - .setTitle(body.query.pages[0].title) - .setAuthor('Bulbapedia', 'https://i.imgur.com/09eYo5T.png') - .setDescription(body.query.pages[0].extract.substr(0, 2000).replace(/[\n]/g, '\n\n')); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('http://bulbapedia.bulbagarden.net/w/api.php') + .query({ + action: 'query', + prop: 'extracts', + format: 'json', + titles: query, + exintro: '', + explaintext: '', + redirects: '', + formatversion: 2 + }); + if (body.query.pages[0].missing) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0x3E7614) + .setTitle(body.query.pages[0].title) + .setAuthor('Bulbapedia', 'https://i.imgur.com/09eYo5T.png') + .setDescription(body.query.pages[0].extract.substr(0, 2000).replace(/[\n]/g, '\n\n')); + return msg.embed(embed); + } }; diff --git a/commands/search/define.js b/commands/search/define.js index e05460e8..909f990e 100644 --- a/commands/search/define.js +++ b/commands/search/define.js @@ -4,39 +4,39 @@ const snekfetch = require('snekfetch'); const { wordnikKey } = require('../../config'); module.exports = class DefineCommand extends Command { - constructor(client) { - super(client, { - name: 'define', - group: 'search', - memberName: 'define', - description: 'Defines a word.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What would you like to define?', - type: 'string', - parse: (query) => encodeURIComponent(query) - } - ] - }); - } + constructor(client) { + super(client, { + name: 'define', + group: 'search', + memberName: 'define', + description: 'Defines a word.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What would you like to define?', + type: 'string', + parse: query => encodeURIComponent(query) + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get(`http://api.wordnik.com:80/v4/word.json/${query}/definitions`) - .query({ - limit: 1, - includeRelated: false, - useCanonical: false, - api_key: wordnikKey - }); - if (!body.length) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0x9797FF) - .setTitle(body[0].word) - .setDescription(body[0].text); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get(`http://api.wordnik.com:80/v4/word.json/${query}/definitions`) + .query({ + limit: 1, + includeRelated: false, + useCanonical: false, + api_key: wordnikKey + }); + if (!body.length) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0x9797FF) + .setTitle(body[0].word) + .setDescription(body[0].text); + return msg.embed(embed); + } }; diff --git a/commands/search/discrim.js b/commands/search/discrim.js index 1fde3cd8..f82aaa53 100644 --- a/commands/search/discrim.js +++ b/commands/search/discrim.js @@ -2,35 +2,35 @@ const Command = require('../../structures/Command'); const { MessageEmbed } = require('discord.js'); module.exports = class DiscrimCommand extends Command { - constructor(client) { - super(client, { - name: 'discrim', - aliases: ['discriminator', 'search-discrim'], - group: 'search', - memberName: 'discrim', - description: 'Searches for other users with a certain discriminator.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'discrim', - prompt: 'Which discriminator would you like to search for?', - type: 'string', - default: '', - validate: (discrim) => { - if (/[0-9]+$/g.test(discrim) && discrim.length === 4) return true; - else return 'Invalid Discriminator.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'discrim', + aliases: ['discriminator', 'search-discrim'], + group: 'search', + memberName: 'discrim', + description: 'Searches for other users with a certain discriminator.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'discrim', + prompt: 'Which discriminator would you like to search for?', + type: 'string', + default: '', + validate: discrim => { + if (/[0-9]+$/g.test(discrim) && discrim.length === 4) return true; + return 'Invalid Discriminator.'; + } + } + ] + }); + } - run(msg, args) { - const discrim = args.discrim || msg.author.discriminator; - const users = this.client.users.filter((user) => user.discriminator === discrim).map((user) => user.username); - const embed = new MessageEmbed() - .setTitle(`${users.length} Users with the discriminator: ${discrim}`) - .setDescription(users.join(', ')); - return msg.embed(embed); - } + run(msg, args) { + const discrim = args.discrim || msg.author.discriminator; + const users = this.client.users.filter(user => user.discriminator === discrim).map(user => user.username); + const embed = new MessageEmbed() + .setTitle(`${users.length} Users with the discriminator: ${discrim}`) + .setDescription(users.join(', ')); + return msg.embed(embed); + } }; diff --git a/commands/search/forecast.js b/commands/search/forecast.js index 49c28aa2..fad44384 100644 --- a/commands/search/forecast.js +++ b/commands/search/forecast.js @@ -4,80 +4,80 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class ForecastCommand extends Command { - constructor(client) { - super(client, { - name: 'forecast', - group: 'search', - memberName: 'forecast', - description: 'Responds with the seven-day forecast for a specified location.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What location would you like to get the forecast for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'forecast', + group: 'search', + memberName: 'forecast', + description: 'Responds with the seven-day forecast for a specified location.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What location would you like to get the forecast for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://query.yahooapis.com/v1/public/yql') - .query({ - q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${query}")`, // eslint-disable-line max-len - format: 'json' - }); - if (!body.query.count) return msg.say('Location Not Found.'); - const forecasts = body.query.results.channel.item.forecast; - const embed = new MessageEmbed() - .setColor(0x0000FF) - .setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png') - .setURL(body.query.results.channel.link) - .setTimestamp() - .addField(`❯ ${forecasts[0].day} - ${forecasts[0].date}`, - stripIndents` - **High:** ${forecasts[0].high}°F - **Low:** ${forecasts[0].low}°F - **Condition:** ${forecasts[0].text} - `) - .addField(`❯ ${forecasts[1].day} - ${forecasts[1].date}`, - stripIndents` - **High:** ${forecasts[1].high}°F - **Low:** ${forecasts[1].low}°F - **Condition:** ${forecasts[1].text} - `) - .addField(`❯ ${forecasts[2].day} - ${forecasts[2].date}`, - stripIndents` - **High:** ${forecasts[2].high}°F - **Low:** ${forecasts[2].low}°F - **Condition:** ${forecasts[2].text} - `) - .addField(`❯ ${forecasts[3].day} - ${forecasts[3].date}`, - stripIndents` - **High:** ${forecasts[3].high}°F - **Low:** ${forecasts[3].low}°F - **Condition:** ${forecasts[3].text} - `) - .addField(`❯ ${forecasts[4].day} - ${forecasts[4].date}`, - stripIndents` - **High:** ${forecasts[4].high}°F - **Low:** ${forecasts[4].low}°F - **Condition:** ${forecasts[4].text} - `) - .addField(`❯ ${forecasts[5].day} - ${forecasts[5].date}`, - stripIndents` - **High:** ${forecasts[5].high}°F - **Low:** ${forecasts[5].low}°F - **Condition:** ${forecasts[5].text} - `) - .addField(`❯ ${forecasts[6].day} - ${forecasts[6].date}`, - stripIndents` - **High:** ${forecasts[6].high}°F - **Low:** ${forecasts[6].low}°F - **Condition:** ${forecasts[6].text} - `); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://query.yahooapis.com/v1/public/yql') + .query({ + q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${query}")`, // eslint-disable-line max-len + format: 'json' + }); + if (!body.query.count) return msg.say('Location Not Found.'); + const forecasts = body.query.results.channel.item.forecast; + const embed = new MessageEmbed() + .setColor(0x0000FF) + .setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png') + .setURL(body.query.results.channel.link) + .setTimestamp() + .addField(`❯ ${forecasts[0].day} - ${forecasts[0].date}`, + stripIndents` + **High:** ${forecasts[0].high}°F + **Low:** ${forecasts[0].low}°F + **Condition:** ${forecasts[0].text} + `) + .addField(`❯ ${forecasts[1].day} - ${forecasts[1].date}`, + stripIndents` + **High:** ${forecasts[1].high}°F + **Low:** ${forecasts[1].low}°F + **Condition:** ${forecasts[1].text} + `) + .addField(`❯ ${forecasts[2].day} - ${forecasts[2].date}`, + stripIndents` + **High:** ${forecasts[2].high}°F + **Low:** ${forecasts[2].low}°F + **Condition:** ${forecasts[2].text} + `) + .addField(`❯ ${forecasts[3].day} - ${forecasts[3].date}`, + stripIndents` + **High:** ${forecasts[3].high}°F + **Low:** ${forecasts[3].low}°F + **Condition:** ${forecasts[3].text} + `) + .addField(`❯ ${forecasts[4].day} - ${forecasts[4].date}`, + stripIndents` + **High:** ${forecasts[4].high}°F + **Low:** ${forecasts[4].low}°F + **Condition:** ${forecasts[4].text} + `) + .addField(`❯ ${forecasts[5].day} - ${forecasts[5].date}`, + stripIndents` + **High:** ${forecasts[5].high}°F + **Low:** ${forecasts[5].low}°F + **Condition:** ${forecasts[5].text} + `) + .addField(`❯ ${forecasts[6].day} - ${forecasts[6].date}`, + stripIndents` + **High:** ${forecasts[6].high}°F + **Low:** ${forecasts[6].low}°F + **Condition:** ${forecasts[6].text} + `); + return msg.embed(embed); + } }; diff --git a/commands/search/giphy.js b/commands/search/giphy.js index 760abee7..cb4b79e2 100644 --- a/commands/search/giphy.js +++ b/commands/search/giphy.js @@ -3,33 +3,33 @@ const snekfetch = require('snekfetch'); const { giphyKey } = require('../../config'); module.exports = class GiphyCommand extends Command { - constructor(client) { - super(client, { - name: 'giphy', - group: 'search', - memberName: 'giphy', - description: 'Searches Giphy for your query.', - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'giphy', + group: 'search', + memberName: 'giphy', + description: 'Searches Giphy for your query.', + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('http://api.giphy.com/v1/gifs/search') - .query({ - q: query, - api_key: giphyKey, - rating: msg.channel.nsfw ? 'r' : 'pg' - }); - if (!body.data.length) return msg.say('No Results.'); - const random = Math.floor(Math.random() * body.data.length); - return msg.say(body.data[random].images.original.url); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('http://api.giphy.com/v1/gifs/search') + .query({ + q: query, + api_key: giphyKey, + rating: msg.channel.nsfw ? 'r' : 'pg' + }); + if (!body.data.length) return msg.say('No Results.'); + const random = Math.floor(Math.random() * body.data.length); + return msg.say(body.data[random].images.original.url); + } }; diff --git a/commands/search/manga.js b/commands/search/manga.js index a1c9dea1..83085531 100644 --- a/commands/search/manga.js +++ b/commands/search/manga.js @@ -7,50 +7,50 @@ const xml = promisifyAll(require('xml2js')); const { animelistLogin } = require('../../config'); module.exports = class MangaCommand extends Command { - constructor(client) { - super(client, { - name: 'manga', - group: 'search', - memberName: 'manga', - description: 'Searches My Anime List for your query, getting manga results.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What manga would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'manga', + group: 'search', + memberName: 'manga', + description: 'Searches My Anime List for your query, getting manga results.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What manga would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - try { - const { text } = await snekfetch - .get(`https://${animelistLogin}@myanimelist.net/api/manga/search.xml`) - .query({ q: query }); - const { manga } = await xml.parseStringAsync(text); - const synopsis = cleanXML(manga.entry[0].synopsis[0].substr(0, 2000)); - const embed = new MessageEmbed() - .setColor(0x2D54A2) - .setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png') - .setURL(`https://myanimelist.net/manga/${manga.entry[0].id[0]}`) - .setThumbnail(manga.entry[0].image[0]) - .setTitle(`${manga.entry[0].title[0]} (English: ${manga.entry[0].english[0] || 'N/A'})`) - .setDescription(synopsis) - .addField('❯ Type', - `${manga.entry[0].type[0]} - ${manga.entry[0].status[0]}`, true) - .addField('❯ Volumes / Chapters', - `${manga.entry[0].volumes[0]} / ${manga.entry[0].chapters[0]}`, true) - .addField('❯ Start Date', - manga.entry[0].start_date[0], true) - .addField('❯ End Date', - manga.entry[0].end_date[0], true); - return msg.embed(embed); - } catch (err) { - if (err.message === 'Parse Error') return msg.say('No Results.'); - else throw err; - } - } + async run(msg, args) { + const { query } = args; + try { + const { text } = await snekfetch + .get(`https://${animelistLogin}@myanimelist.net/api/manga/search.xml`) + .query({ q: query }); + const { manga } = await xml.parseStringAsync(text); + const synopsis = cleanXML(manga.entry[0].synopsis[0].substr(0, 2000)); + const embed = new MessageEmbed() + .setColor(0x2D54A2) + .setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png') + .setURL(`https://myanimelist.net/manga/${manga.entry[0].id[0]}`) + .setThumbnail(manga.entry[0].image[0]) + .setTitle(`${manga.entry[0].title[0]} (English: ${manga.entry[0].english[0] || 'N/A'})`) + .setDescription(synopsis) + .addField('❯ Type', + `${manga.entry[0].type[0]} - ${manga.entry[0].status[0]}`, true) + .addField('❯ Volumes / Chapters', + `${manga.entry[0].volumes[0]} / ${manga.entry[0].chapters[0]}`, true) + .addField('❯ Start Date', + manga.entry[0].start_date[0], true) + .addField('❯ End Date', + manga.entry[0].end_date[0], true); + return msg.embed(embed); + } catch (err) { + if (err.message === 'Parse Error') return msg.say('No Results.'); + throw err; + } + } }; diff --git a/commands/search/map.js b/commands/search/map.js index 77223fb6..a38a8d3b 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -3,43 +3,43 @@ const snekfetch = require('snekfetch'); const { googleKey } = require('../../config'); module.exports = class MapCommand extends Command { - constructor(client) { - super(client, { - name: 'map', - group: 'search', - memberName: 'map', - description: 'Responds with a map based upon your query.', - clientPermissions: ['ATTACH_FILES'], - 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; - else return 'Please enter a zoom value from 1-20'; - } - }, - { - key: 'query', - prompt: 'What location you like to get a map image for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'map', + group: 'search', + memberName: 'map', + description: 'Responds with a map based upon your query.', + clientPermissions: ['ATTACH_FILES'], + 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' + } + ] + }); + } - async run(msg, args) { - const { zoom, query } = args; - const { body } = await snekfetch - .get('https://maps.googleapis.com/maps/api/staticmap') - .query({ - center: query, - zoom, - size: '500x500', - key: googleKey - }); - return msg.say({ files: [{ attachment: body, name: 'map.png' }] }); - } + async run(msg, args) { + const { zoom, query } = args; + const { body } = await snekfetch + .get('https://maps.googleapis.com/maps/api/staticmap') + .query({ + center: query, + zoom, + size: '500x500', + key: googleKey + }); + return msg.say({ files: [{ attachment: body, name: 'map.png' }] }); + } }; diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 3bdbc976..ebe6b57d 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -3,34 +3,34 @@ const snekfetch = require('snekfetch'); const cheerio = require('cheerio'); module.exports = class NeopetCommand extends Command { - constructor(client) { - super(client, { - name: 'neopet', - group: 'search', - memberName: 'neopet', - description: 'Searches for Neopets with the username of your query.', - args: [ - { - key: 'query', - prompt: 'What pet would you like to get the image of?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'neopet', + group: 'search', + memberName: 'neopet', + description: 'Searches for Neopets with the username of your query.', + args: [ + { + key: 'query', + prompt: 'What pet would you like to get the image of?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { text } = await snekfetch - .get('http://www.sunnyneo.com/petimagefinder.php') - .query({ - name: query, - size: 5, - mood: 1 - }); - const $ = cheerio.load(text); - const link = $('textarea').first().text(); - if (!link.includes('cp')) return msg.say('Invalid Pet Name.'); - return msg.say(link); - } + async run(msg, args) { + const { query } = args; + const { text } = await snekfetch + .get('http://www.sunnyneo.com/petimagefinder.php') + .query({ + name: query, + size: 5, + mood: 1 + }); + const $ = cheerio.load(text); + const link = $('textarea').first().text(); + if (!link.includes('cp')) return msg.say('Invalid Pet Name.'); + return msg.say(link); + } }; diff --git a/commands/search/npm.js b/commands/search/npm.js index bd77da5f..d2c1f21b 100644 --- a/commands/search/npm.js +++ b/commands/search/npm.js @@ -4,54 +4,54 @@ const snekfetch = require('snekfetch'); const moment = require('moment'); module.exports = class NPMCommand extends Command { - constructor(client) { - super(client, { - name: 'npm', - group: 'search', - memberName: 'npm', - description: 'Searches NPM for info on an NPM package.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What package do you want to get information for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'npm', + group: 'search', + memberName: 'npm', + description: 'Searches NPM for info on an NPM package.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What package do you want to get information for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - try { - const { query } = args; - const { body } = await snekfetch - .get(`https://registry.npmjs.com/${query}`); - const embed = new MessageEmbed() - .setColor(0xCB0000) - .setAuthor('NPM', 'https://i.imgur.com/BCODHXd.png') - .setTitle(body.name) - .setURL(`https://www.npmjs.com/package/${query}`) - .setDescription(body.description || 'No Description.') - .addField('❯ Version', - body['dist-tags'].latest, true) - .addField('❯ License', - body.license || 'None', true) - .addField('❯ Author', - body.author ? body.author.name : 'Unknown', true) - .addField('❯ Created', - moment(body.time.created).format('MMMM Do YYYY'), true) - .addField('❯ Modified', - moment(body.time.modified).format('MMMM Do YYYY'), true) - .addField('❯ Main File', - body.versions[body['dist-tags'].latest].main, true) - .addField('❯ Keywords', - body.keywords && body.keywords.length ? body.keywords.join(', ').substr(0, 1024) : 'None') - .addField('❯ Maintainers', - body.maintainers.map((user) => user.name).join(', ')); - return msg.embed(embed); - } catch (err) { - if (err.status === 404) return msg.say('Not Found.'); - else throw err; - } - } + async run(msg, args) { + const { query } = args; + try { + const { body } = await snekfetch + .get(`https://registry.npmjs.com/${query}`); + const embed = new MessageEmbed() + .setColor(0xCB0000) + .setAuthor('NPM', 'https://i.imgur.com/BCODHXd.png') + .setTitle(body.name) + .setURL(`https://www.npmjs.com/package/${query}`) + .setDescription(body.description || 'No Description.') + .addField('❯ Version', + body['dist-tags'].latest, true) + .addField('❯ License', + body.license || 'None', true) + .addField('❯ Author', + body.author ? body.author.name : 'Unknown', true) + .addField('❯ Created', + moment(body.time.created).format('MMMM Do YYYY'), true) + .addField('❯ Modified', + moment(body.time.modified).format('MMMM Do YYYY'), true) + .addField('❯ Main File', + body.versions[body['dist-tags'].latest].main, true) + .addField('❯ Keywords', + body.keywords && body.keywords.length ? body.keywords.join(', ').substr(0, 1024) : 'None') + .addField('❯ Maintainers', + body.maintainers.map(user => user.name).join(', ')); + return msg.embed(embed); + } catch (err) { + if (err.status === 404) return msg.say('Not Found.'); + throw err; + } + } }; diff --git a/commands/search/osu.js b/commands/search/osu.js index 4250a1dc..eff3c20c 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -4,61 +4,61 @@ const snekfetch = require('snekfetch'); const { osuKey } = require('../../config'); module.exports = class OsuCommand extends Command { - constructor(client) { - super(client, { - name: 'osu', - group: 'search', - memberName: 'osu', - description: 'Searches osu! usernames for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What osu username would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'osu', + group: 'search', + memberName: 'osu', + description: 'Searches osu! usernames for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What osu username would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://osu.ppy.sh/api/get_user') - .query({ - k: osuKey, - u: query, - type: 'string' - }); - if (!body.length) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0xFF66AA) - .setAuthor('osu!', 'https://i.imgur.com/EmnUp00.png') - .setURL('https://osu.ppy.sh/') - .addField('❯ Username', - body[0].username, true) - .addField('❯ ID', - body[0].user_id, true) - .addField('❯ Level', - body[0].level, true) - .addField('❯ Accuracy', - body[0].accuracy, true) - .addField('❯ Rank', - body[0].pp_rank, true) - .addField('❯ Play Count', - body[0].playcount, true) - .addField('❯ Country', - body[0].country, true) - .addField('❯ Ranked Score', - body[0].ranked_score, true) - .addField('❯ Total Score', - body[0].total_score, true) - .addField('❯ SS', - body[0].count_rank_ss, true) - .addField('❯ S', - body[0].count_rank_s, true) - .addField('❯ A', - body[0].count_rank_a, true); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://osu.ppy.sh/api/get_user') + .query({ + k: osuKey, + u: query, + type: 'string' + }); + if (!body.length) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0xFF66AA) + .setAuthor('osu!', 'https://i.imgur.com/EmnUp00.png') + .setURL('https://osu.ppy.sh/') + .addField('❯ Username', + body[0].username, true) + .addField('❯ ID', + body[0].user_id, true) + .addField('❯ Level', + body[0].level, true) + .addField('❯ Accuracy', + body[0].accuracy, true) + .addField('❯ Rank', + body[0].pp_rank, true) + .addField('❯ Play Count', + body[0].playcount, true) + .addField('❯ Country', + body[0].country, true) + .addField('❯ Ranked Score', + body[0].ranked_score, true) + .addField('❯ Total Score', + body[0].total_score, true) + .addField('❯ SS', + body[0].count_rank_ss, true) + .addField('❯ S', + body[0].count_rank_s, true) + .addField('❯ A', + body[0].count_rank_a, true); + return msg.embed(embed); + } }; diff --git a/commands/search/pokedex.js b/commands/search/pokedex.js index 38cab36a..432ffa3e 100644 --- a/commands/search/pokedex.js +++ b/commands/search/pokedex.js @@ -4,51 +4,51 @@ const snekfetch = require('snekfetch'); const { stripIndents } = require('common-tags'); module.exports = class PokedexCommand extends Command { - constructor(client) { - super(client, { - name: 'pokedex', - aliases: ['pokemon', 'pokémon', 'pokédex'], - group: 'search', - memberName: 'pokedex', - description: 'Searches the Pokédex for a Pokémon.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'pokemon', - prompt: 'What Pokémon would you like to search for?', - type: 'string', - parse: (pokemon) => pokemon.toLowerCase().replace(/[ ]/g, '-') - } - ] - }); - } + constructor(client) { + super(client, { + name: 'pokedex', + aliases: ['pokemon', 'pokémon', 'pokédex'], + group: 'search', + memberName: 'pokedex', + description: 'Searches the Pokédex for a Pokémon.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'pokemon', + prompt: 'What Pokémon would you like to search for?', + type: 'string', + parse: pokemon => pokemon.toLowerCase().replace(/[ ]/g, '-') + } + ] + }); + } - async run(msg, args) { - const { pokemon } = args; - try { - const { body } = await snekfetch - .get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`); - const id = `${'000'.slice(body.id.toString().length)}${body.id}`; - const name = this.filter(body.names).name; - const flavor = this.filter(body.flavor_text_entries).flavor_text; - const species = this.filter(body.genera).genus; - const embed = new MessageEmbed() - .setColor(0xED1C24) - .setAuthor(`#${id} - ${name}`, `https://www.serebii.net/pokedex-sm/icon/${id}.png`) - .setURL(`https://www.serebii.net/pokedex-sm/${id}.shtml`) - .setDescription(stripIndents` - **The ${species} Pokémon** - ${flavor} - `) - .setThumbnail(`https://www.serebii.net/sunmoon/pokemon/${id}.png`); - return msg.embed(embed); - } catch (err) { - if (err.status === 404) return msg.say('Pokémon Not Found.'); - else throw err; - } - } + async run(msg, args) { + const { pokemon } = args; + try { + const { body } = await snekfetch + .get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`); + const id = `${'000'.slice(body.id.toString().length)}${body.id}`; + const name = this.filter(body.names).name; + const flavor = this.filter(body.flavor_text_entries).flavor_text.replace(/\n/g, ' '); + const species = this.filter(body.genera).genus; + const embed = new MessageEmbed() + .setColor(0xED1C24) + .setAuthor(`#${id} - ${name}`, `https://www.serebii.net/pokedex-sm/icon/${id}.png`) + .setURL(`https://www.serebii.net/pokedex-sm/${id}.shtml`) + .setDescription(stripIndents` + **The ${species} Pokémon** + ${flavor} + `) + .setThumbnail(`https://www.serebii.net/sunmoon/pokemon/${id}.png`); + return msg.embed(embed); + } catch (err) { + if (err.status === 404) return msg.say('Pokémon Not Found.'); + throw err; + } + } - filter(arr) { - return arr.filter((entry) => entry.language.name === 'en')[0]; - } + filter(arr) { + return arr.filter(entry => entry.language.name === 'en')[0]; + } }; diff --git a/commands/search/recipe.js b/commands/search/recipe.js index c90a07f2..05bce603 100644 --- a/commands/search/recipe.js +++ b/commands/search/recipe.js @@ -3,41 +3,41 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class RecipeCommand extends Command { - constructor(client) { - super(client, { - name: 'recipe', - group: 'search', - memberName: 'recipe', - description: 'Searches for recipes that include your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'recipe', + group: 'search', + memberName: 'recipe', + description: 'Searches for recipes that include your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - try { - const { query } = args; - const { text } = await snekfetch - .get('http://www.recipepuppy.com/api/') - .query({ q: query }); - const body = JSON.parse(text); - if (!body.results.length) return msg.say('No Results.'); - const recipe = body.results[Math.floor(Math.random() * body.results.length)]; - const embed = new MessageEmbed() - .setColor(0xC20000) - .setURL(recipe.href) - .setTitle(recipe.title) - .setDescription(`**Ingredients:** ${recipe.ingredients}`) - .setThumbnail(recipe.thumbnail); - return msg.embed(embed); - } catch (err) { - return msg.say('No Results.'); - } - } + async run(msg, args) { + try { + const { query } = args; + const { text } = await snekfetch + .get('http://www.recipepuppy.com/api/') + .query({ q: query }); + const body = JSON.parse(text); + if (!body.results.length) return msg.say('No Results.'); + const recipe = body.results[Math.floor(Math.random() * body.results.length)]; + const embed = new MessageEmbed() + .setColor(0xC20000) + .setURL(recipe.href) + .setTitle(recipe.title) + .setDescription(`**Ingredients:** ${recipe.ingredients}`) + .setThumbnail(recipe.thumbnail); + return msg.embed(embed); + } catch (err) { + return msg.say('No Results.'); + } + } }; diff --git a/commands/search/reddit.js b/commands/search/reddit.js index 120fcf6b..577304bf 100644 --- a/commands/search/reddit.js +++ b/commands/search/reddit.js @@ -3,48 +3,48 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class RedditCommand extends Command { - constructor(client) { - super(client, { - name: 'reddit', - group: 'search', - memberName: 'reddit', - description: 'Gets a random recent post from a subreddit.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'subreddit', - prompt: 'What subreddit would you like to get data for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'reddit', + group: 'search', + memberName: 'reddit', + description: 'Gets a random recent post from a subreddit.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'subreddit', + prompt: 'What subreddit would you like to get data for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - try { - const { subreddit } = args; - const { body } = await snekfetch - .get(`https://www.reddit.com/r/${subreddit}/new.json`) - .query({ sort: 'new' }); - const post = body.data.children[Math.floor(Math.random() * body.data.children.length)].data; - if (!msg.channel.nsfw && post.over_18) return msg.say('This post is only viewable in NSFW Channels.'); - const embed = new MessageEmbed() - .setColor(0xFF4500) - .setAuthor('Reddit', 'https://i.imgur.com/V6hXniU.png') - .setURL(`https://www.reddit.com${post.permalink}`) - .setTitle(post.title) - .setDescription(`[View URL Here](${post.url})`) - .setThumbnail(post.thumbnail !== 'self' ? post.thumbnail : null) - .addField('❯ Upvotes', - post.ups, true) - .addField('❯ Downvotes', - post.downs, true) - .addField('❯ Score', - post.score, true); - return msg.embed(embed); - } catch (err) { - if (err.status === 404) return msg.say('Subreddit Not Found.'); - else throw err; - } - } + async run(msg, args) { + try { + const { subreddit } = args; + const { body } = await snekfetch + .get(`https://www.reddit.com/r/${subreddit}/new.json`) + .query({ sort: 'new' }); + const post = body.data.children[Math.floor(Math.random() * body.data.children.length)].data; + if (!msg.channel.nsfw && post.over_18) return msg.say('This post is only viewable in NSFW Channels.'); + const embed = new MessageEmbed() + .setColor(0xFF4500) + .setAuthor('Reddit', 'https://i.imgur.com/V6hXniU.png') + .setURL(`https://www.reddit.com${post.permalink}`) + .setTitle(post.title) + .setDescription(`[View URL Here](${post.url})`) + .setThumbnail(post.thumbnail !== 'self' ? post.thumbnail : null) + .addField('❯ Upvotes', + post.ups, true) + .addField('❯ Downvotes', + post.downs, true) + .addField('❯ Score', + post.score, true); + return msg.embed(embed); + } catch (err) { + if (err.status === 404) return msg.say('Subreddit Not Found.'); + throw err; + } + } }; diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js index ddc95d48..d6fb5281 100644 --- a/commands/search/soundcloud.js +++ b/commands/search/soundcloud.js @@ -4,48 +4,48 @@ const snekfetch = require('snekfetch'); const { soundcloudKey } = require('../../config'); module.exports = class SoundCloudCommand extends Command { - constructor(client) { - super(client, { - name: 'soundcloud', - group: 'search', - memberName: 'soundcloud', - description: 'Searches SoundCloud for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What do you want to search SoundCloud for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'soundcloud', + group: 'search', + memberName: 'soundcloud', + description: 'Searches SoundCloud for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What do you want to search SoundCloud for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://api.soundcloud.com/tracks') - .query({ - q: query, - client_id: soundcloudKey - }); - if (!body.length) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0xF15A22) - .setAuthor('SoundCloud', 'https://i.imgur.com/lFIz7RU.png') - .setTitle(body[0].title) - .setURL(body[0].permalink_url) - .setThumbnail(body[0].artwork_url) - .addField('❯ Artist', - body[0].user.username) - .addField('❯ Download Count', - body[0].download_count, true) - .addField('❯ Comment Count', - body[0].comment_count, true) - .addField('❯ Playback Count', - body[0].playback_count, true) - .addField('❯ Favorited Count', - body[0].favoritings_count, true); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://api.soundcloud.com/tracks') + .query({ + q: query, + client_id: soundcloudKey + }); + if (!body.length) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0xF15A22) + .setAuthor('SoundCloud', 'https://i.imgur.com/lFIz7RU.png') + .setTitle(body[0].title) + .setURL(body[0].permalink_url) + .setThumbnail(body[0].artwork_url) + .addField('❯ Artist', + body[0].user.username) + .addField('❯ Download Count', + body[0].download_count, true) + .addField('❯ Comment Count', + body[0].comment_count, true) + .addField('❯ Playback Count', + body[0].playback_count, true) + .addField('❯ Favorited Count', + body[0].favoritings_count, true); + return msg.embed(embed); + } }; diff --git a/commands/search/urban.js b/commands/search/urban.js index f26cd0b8..7c1f3d0d 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -3,37 +3,37 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class UrbanCommand extends Command { - constructor(client) { - super(client, { - name: 'urban', - group: 'search', - memberName: 'urban', - description: 'Searches Urban Dictionary for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What would you like to define?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'urban', + group: 'search', + memberName: 'urban', + description: 'Searches Urban Dictionary for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What would you like to define?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('http://api.urbandictionary.com/v0/define') - .query({ term: query }); - if (!body.list.length) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0x32A8F0) - .setAuthor('Urban Dictionary', 'https://i.imgur.com/fzFuuL7.png') - .setURL(body.list[0].permalink) - .setTitle(body.list[0].word) - .setDescription(body.list[0].definition.substr(0, 2000)) - .addField('❯ Example', - body.list[0].example.substr(0, 1024) || 'None'); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('http://api.urbandictionary.com/v0/define') + .query({ term: query }); + if (!body.list.length) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0x32A8F0) + .setAuthor('Urban Dictionary', 'https://i.imgur.com/fzFuuL7.png') + .setURL(body.list[0].permalink) + .setTitle(body.list[0].word) + .setDescription(body.list[0].definition.substr(0, 2000)) + .addField('❯ Example', + body.list[0].example.substr(0, 1024) || 'None'); + return msg.embed(embed); + } }; diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 4a3f7c8f..a90847e1 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -5,52 +5,52 @@ const moment = require('moment'); const { wattpadKey } = require('../../config'); module.exports = class WattpadCommand extends Command { - constructor(client) { - super(client, { - name: 'wattpad', - group: 'search', - memberName: 'wattpad', - description: 'Searches Wattpad for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What book would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'wattpad', + group: 'search', + memberName: 'wattpad', + description: 'Searches Wattpad for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What book would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://api.wattpad.com:443/v4/stories') - .query({ - query, - limit: 1 - }) - .set({ Authorization: `Basic ${wattpadKey}` }); - if (!body.stories.length) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0xF89C34) - .setAuthor('Wattpad', 'https://i.imgur.com/Rw9vRQB.png') - .setURL(body.stories[0].url) - .setTitle(body.stories[0].title) - .setDescription(body.stories[0].description.substr(0, 2000)) - .setThumbnail(body.stories[0].cover) - .addField('❯ Created On', - moment(body.stories[0].createDate).format('MMMM Do YYYY'), true) - .addField('❯ Author', - body.stories[0].user, true) - .addField('❯ Parts', - body.stories[0].numParts, true) - .addField('❯ Reads', - body.stories[0].readCount, true) - .addField('❯ Votes', - body.stories[0].voteCount, true) - .addField('❯ Comments', - body.stories[0].commentCount, true); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://api.wattpad.com:443/v4/stories') + .query({ + query, + limit: 1 + }) + .set({ Authorization: `Basic ${wattpadKey}` }); + if (!body.stories.length) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0xF89C34) + .setAuthor('Wattpad', 'https://i.imgur.com/Rw9vRQB.png') + .setURL(body.stories[0].url) + .setTitle(body.stories[0].title) + .setDescription(body.stories[0].description.substr(0, 2000)) + .setThumbnail(body.stories[0].cover) + .addField('❯ Created On', + moment(body.stories[0].createDate).format('MMMM Do YYYY'), true) + .addField('❯ Author', + body.stories[0].user, true) + .addField('❯ Parts', + body.stories[0].numParts, true) + .addField('❯ Reads', + body.stories[0].readCount, true) + .addField('❯ Votes', + body.stories[0].voteCount, true) + .addField('❯ Comments', + body.stories[0].commentCount, true); + return msg.embed(embed); + } }; diff --git a/commands/search/weather.js b/commands/search/weather.js index 54c2ffec..b78b7f95 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -3,61 +3,61 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class WeatherCommand extends Command { - constructor(client) { - super(client, { - name: 'weather', - group: 'search', - memberName: 'weather', - description: 'Responds with weather information for a specified location.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What location would you like to get the current weather for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'weather', + group: 'search', + memberName: 'weather', + description: 'Responds with weather information for a specified location.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What location would you like to get the current weather for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://query.yahooapis.com/v1/public/yql') - .query({ - q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${query}")`, // eslint-disable-line max-len - format: 'json' - }); - if (!body.query.count) return msg.say('Location Not Found.'); - const embed = new MessageEmbed() - .setColor(0x0000FF) - .setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png') - .setURL(body.query.results.channel.link) - .setTimestamp() - .addField('❯ City', - body.query.results.channel.location.city, true) - .addField('❯ Country', - body.query.results.channel.location.country, true) - .addField('❯ Region', - body.query.results.channel.location.region, true) - .addField('❯ Condition', - body.query.results.channel.item.condition.text, true) - .addField('❯ Temperature', - `${body.query.results.channel.item.condition.temp}°F`, true) - .addField('❯ Humidity', - body.query.results.channel.atmosphere.humidity, true) - .addField('❯ Pressure', - body.query.results.channel.atmosphere.pressure, true) - .addField('❯ Rising', - body.query.results.channel.atmosphere.rising, true) - .addField('❯ Visibility', - body.query.results.channel.atmosphere.visibility, true) - .addField('❯ Wind Chill', - body.query.results.channel.wind.chill, true) - .addField('❯ Wind Direction', - body.query.results.channel.wind.direction, true) - .addField('❯ Wind Speed', - body.query.results.channel.wind.speed, true); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://query.yahooapis.com/v1/public/yql') + .query({ + q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${query}")`, // eslint-disable-line max-len + format: 'json' + }); + if (!body.query.count) return msg.say('Location Not Found.'); + const embed = new MessageEmbed() + .setColor(0x0000FF) + .setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png') + .setURL(body.query.results.channel.link) + .setTimestamp() + .addField('❯ City', + body.query.results.channel.location.city, true) + .addField('❯ Country', + body.query.results.channel.location.country, true) + .addField('❯ Region', + body.query.results.channel.location.region, true) + .addField('❯ Condition', + body.query.results.channel.item.condition.text, true) + .addField('❯ Temperature', + `${body.query.results.channel.item.condition.temp}°F`, true) + .addField('❯ Humidity', + body.query.results.channel.atmosphere.humidity, true) + .addField('❯ Pressure', + body.query.results.channel.atmosphere.pressure, true) + .addField('❯ Rising', + body.query.results.channel.atmosphere.rising, true) + .addField('❯ Visibility', + body.query.results.channel.atmosphere.visibility, true) + .addField('❯ Wind Chill', + body.query.results.channel.wind.chill, true) + .addField('❯ Wind Direction', + body.query.results.channel.wind.direction, true) + .addField('❯ Wind Speed', + body.query.results.channel.wind.speed, true); + return msg.embed(embed); + } }; diff --git a/commands/search/wikia.js b/commands/search/wikia.js index b08b35e7..03bc82ee 100644 --- a/commands/search/wikia.js +++ b/commands/search/wikia.js @@ -3,53 +3,53 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class WikiaCommand extends Command { - constructor(client) { - super(client, { - name: 'wikia', - aliases: ['fandom'], - group: 'search', - memberName: 'wikia', - description: 'Searches a specified Wikia wiki for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'wiki', - prompt: 'What is the subdomain of the wikia you want to search?', - type: 'string' - }, - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'wikia', + aliases: ['fandom'], + group: 'search', + memberName: 'wikia', + description: 'Searches a specified Wikia wiki for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'wiki', + prompt: 'What is the subdomain of the wikia you want to search?', + type: 'string' + }, + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { wiki, query } = args; - try { - const search = await snekfetch - .get(`http://${wiki}.wikia.com/api/v1/Search/List/`) - .query({ - query, - limit: 1, - namespaces: 0 - }); - const id = search.body.items[0].id; - const { body } = await snekfetch - .get(`http://${wiki}.wikia.com/api/v1/Articles/AsSimpleJson/`) - .query({ id }); - const embed = new MessageEmbed() - .setColor(0x002D54) - .setTitle(body.sections[0].title) - .setURL(search.body.items[0].url) - .setAuthor('Wikia', 'https://i.imgur.com/WzXWJka.png') - .setDescription(body.sections[0].content.map((i) => i.text).join('\n\n').substr(0, 2000)) - .setThumbnail(body.sections[0].images[0] ? body.sections[0].images[0].src : null); - return msg.embed(embed); - } catch (err) { - return msg.say('No Results or Invalid Wiki.'); - } - } + async run(msg, args) { + const { wiki, query } = args; + try { + const search = await snekfetch + .get(`http://${wiki}.wikia.com/api/v1/Search/List/`) + .query({ + query, + limit: 1, + namespaces: 0 + }); + const id = search.body.items[0].id; + const { body } = await snekfetch + .get(`http://${wiki}.wikia.com/api/v1/Articles/AsSimpleJson/`) + .query({ id }); + const embed = new MessageEmbed() + .setColor(0x002D54) + .setTitle(body.sections[0].title) + .setURL(search.body.items[0].url) + .setAuthor('Wikia', 'https://i.imgur.com/WzXWJka.png') + .setDescription(body.sections[0].content.map(i => i.text).join('\n\n').substr(0, 2000)) + .setThumbnail(body.sections[0].images[0] ? body.sections[0].images[0].src : null); + return msg.embed(embed); + } catch (err) { + return msg.say('No Results or Invalid Wiki.'); + } + } }; diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 4bbac300..3164e2c5 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -3,43 +3,43 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class WikipediaCommand extends Command { - constructor(client) { - super(client, { - name: 'wikipedia', - group: 'search', - memberName: 'wikipedia', - description: 'Searches Wikipedia for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'wikipedia', + group: 'search', + memberName: 'wikipedia', + description: 'Searches Wikipedia for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://en.wikipedia.org/w/api.php') - .query({ - action: 'query', - prop: 'extracts', - format: 'json', - titles: query, - exintro: '', - explaintext: '', - redirects: '', - formatversion: 2 - }); - if (body.query.pages[0].missing) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0xE7E7E7) - .setTitle(body.query.pages[0].title) - .setAuthor('Wikipedia', 'https://i.imgur.com/a4eeEhh.png') - .setDescription(body.query.pages[0].extract.substr(0, 2000).replace(/[\n]/g, '\n\n')); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://en.wikipedia.org/w/api.php') + .query({ + action: 'query', + prop: 'extracts', + format: 'json', + titles: query, + exintro: '', + explaintext: '', + redirects: '', + formatversion: 2 + }); + if (body.query.pages[0].missing) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0xE7E7E7) + .setTitle(body.query.pages[0].title) + .setAuthor('Wikipedia', 'https://i.imgur.com/a4eeEhh.png') + .setDescription(body.query.pages[0].extract.substr(0, 2000).replace(/[\n]/g, '\n\n')); + return msg.embed(embed); + } }; diff --git a/commands/search/youtube.js b/commands/search/youtube.js index f5f8b40b..35223af5 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -4,42 +4,42 @@ const snekfetch = require('snekfetch'); const { googleKey } = require('../../config'); module.exports = class YouTubeCommand extends Command { - constructor(client) { - super(client, { - name: 'youtube', - group: 'search', - memberName: 'youtube', - description: 'Searches YouTube for your query.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'youtube', + group: 'search', + memberName: 'youtube', + description: 'Searches YouTube for your query.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What would you like to search for?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get('https://www.googleapis.com/youtube/v3/search') - .query({ - part: 'snippet', - type: 'video', - maxResults: 1, - q: query, - key: googleKey - }); - if (!body.items.length) return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0xDD2825) - .setTitle(body.items[0].snippet.title) - .setDescription(body.items[0].snippet.description) - .setAuthor(`YouTube - ${body.items[0].snippet.channelTitle}`, 'https://i.imgur.com/hkUafwu.png') - .setURL(`https://www.youtube.com/watch?v=${body.items[0].id.videoId}`) - .setThumbnail(body.items[0].snippet.thumbnails.default.url); - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get('https://www.googleapis.com/youtube/v3/search') + .query({ + part: 'snippet', + type: 'video', + maxResults: 1, + q: query, + key: googleKey + }); + if (!body.items.length) return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0xDD2825) + .setTitle(body.items[0].snippet.title) + .setDescription(body.items[0].snippet.description) + .setAuthor(`YouTube - ${body.items[0].snippet.channelTitle}`, 'https://i.imgur.com/hkUafwu.png') + .setURL(`https://www.youtube.com/watch?v=${body.items[0].id.videoId}`) + .setThumbnail(body.items[0].snippet.thumbnails.default.url); + return msg.embed(embed); + } }; diff --git a/commands/search/yu-gi-oh.js b/commands/search/yu-gi-oh.js index c7140641..93d41327 100644 --- a/commands/search/yu-gi-oh.js +++ b/commands/search/yu-gi-oh.js @@ -3,49 +3,49 @@ const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class YuGiOhCommand extends Command { - constructor(client) { - super(client, { - name: 'yu-gi-oh', - group: 'search', - memberName: 'yu-gi-oh', - description: 'Responds with info on a Yu-Gi-Oh! card.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'query', - prompt: 'What card would you like to get data for?', - type: 'string', - parse: (text) => encodeURIComponent(text) - } - ] - }); - } + constructor(client) { + super(client, { + name: 'yu-gi-oh', + group: 'search', + memberName: 'yu-gi-oh', + description: 'Responds with info on a Yu-Gi-Oh! card.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'query', + prompt: 'What card would you like to get data for?', + type: 'string', + parse: text => encodeURIComponent(text) + } + ] + }); + } - async run(msg, args) { - const { query } = args; - const { body } = await snekfetch - .get(`http://yugiohprices.com/api/card_data/${query}`); - if (body.status === 'fail') return msg.say('No Results.'); - const embed = new MessageEmbed() - .setColor(0xBE5F1F) - .setTitle(body.data.name) - .setDescription(body.data.text) - .setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/7gPm9Rr.png') - .addField('❯ Card Type', - body.data.card_type, true); - if (body.data.card_type === 'monster') { - embed - .addField('❯ Type', - body.data.type, true) - .addField('❯ Attribute', - body.data.family, true) - .addField('❯ ATK', - body.data.atk, true) - .addField('❯ DEF', - body.data.def, true) - .addField('❯ Level', - body.data.level, true); - } - return msg.embed(embed); - } + async run(msg, args) { + const { query } = args; + const { body } = await snekfetch + .get(`http://yugiohprices.com/api/card_data/${query}`); + if (body.status === 'fail') return msg.say('No Results.'); + const embed = new MessageEmbed() + .setColor(0xBE5F1F) + .setTitle(body.data.name) + .setDescription(body.data.text) + .setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/7gPm9Rr.png') + .addField('❯ Card Type', + body.data.card_type, true); + if (body.data.card_type === 'monster') { + embed + .addField('❯ Type', + body.data.type, true) + .addField('❯ Attribute', + body.data.family, true) + .addField('❯ ATK', + body.data.atk, true) + .addField('❯ DEF', + body.data.def, true) + .addField('❯ Level', + body.data.level, true); + } + return msg.embed(embed); + } }; diff --git a/commands/text-edit/binary.js b/commands/text-edit/binary.js index 3dcf7afa..16305bc9 100644 --- a/commands/text-edit/binary.js +++ b/commands/text-edit/binary.js @@ -1,36 +1,39 @@ const Command = require('../../structures/Command'); module.exports = class BinaryCommand extends Command { - constructor(client) { - super(client, { - name: 'binary', - group: 'text-edit', - 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 (this.binary(text).length < 2000) return true; - else return 'Your text is too long.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'binary', + group: 'text-edit', + 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 (this.binary(text).length < 2000) return true; + return 'Your text is too long.'; + } + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = this.binary(text); - return msg.say(converted); - } + run(msg, args) { + const { text } = args; + const converted = this.binary(text); + return msg.say(converted); + } - binary(text) { - return unescape(encodeURIComponent(text)).split('').map((str) => { - const converted = str.charCodeAt(0).toString(2); - return `${'00000000'.slice(converted.length)}${converted}`; - }).join(''); - } + binary(text) { + return unescape(encodeURIComponent(text)) + .split('') + .map(str => { + const converted = str.charCodeAt(0).toString(2); + return `${'00000000'.slice(converted.length)}${converted}`; + }) + .join(''); + } }; diff --git a/commands/text-edit/cow-say.js b/commands/text-edit/cow-say.js index 1dd2df01..41747020 100644 --- a/commands/text-edit/cow-say.js +++ b/commands/text-edit/cow-say.js @@ -2,37 +2,37 @@ const Command = require('../../structures/Command'); const { stripIndent } = require('common-tags'); module.exports = class CowsayCommand extends Command { - constructor(client) { - super(client, { - name: 'cow-say', - group: 'text-edit', - memberName: 'cow-say', - 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; - else return 'Text must be under 1500 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'cow-say', + group: 'text-edit', + memberName: 'cow-say', + 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 'Text must be under 1500 characters.'; + } + } + ] + }); + } - run(msg, args) { - const { text } = args; - return msg.code(null, - stripIndent` - < ${text} > - \\ ^__^ - \\ (oO)\\_______ - (__)\\ )\\/\\ - U ||----w | - || || - ` - ); - } + run(msg, args) { + const { text } = args; + return msg.code(null, + stripIndent` + < ${text} > + \\ ^__^ + \\ (oO)\\_______ + (__)\\ )\\/\\ + U ||----w | + || || + ` + ); + } }; diff --git a/commands/text-edit/embed.js b/commands/text-edit/embed.js index 58dc3cc3..e4f601c5 100644 --- a/commands/text-edit/embed.js +++ b/commands/text-edit/embed.js @@ -2,30 +2,30 @@ const Command = require('../../structures/Command'); const { MessageEmbed } = require('discord.js'); module.exports = class EmbedCommand extends Command { - constructor(client) { - super(client, { - name: 'embed', - group: 'text-edit', - memberName: 'embed', - description: 'Sends a message in an embed.', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'text', - prompt: 'What text would you like to embed?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'embed', + group: 'text-edit', + memberName: 'embed', + description: 'Sends a message in an embed.', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'text', + prompt: 'What text would you like to embed?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { text } = args; - const embed = new MessageEmbed() - .setAuthor(msg.author.tag, msg.author.displayAvatarURL) - .setColor(0x00AE86) - .setTimestamp() - .setDescription(text); - return msg.embed(embed); - } + run(msg, args) { + const { text } = args; + const embed = new MessageEmbed() + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) + .setColor(0x00AE86) + .setTimestamp() + .setDescription(text); + return msg.embed(embed); + } }; diff --git a/commands/text-edit/mocking.js b/commands/text-edit/mocking.js index 6213325d..276df025 100644 --- a/commands/text-edit/mocking.js +++ b/commands/text-edit/mocking.js @@ -1,33 +1,33 @@ const Command = require('../../structures/Command'); module.exports = class MockingCommand extends Command { - constructor(client) { - super(client, { - name: 'mocking', - aliases: ['mock'], - group: 'text-edit', - memberName: 'mocking', - description: 'SenDs TexT lIkE ThiS.', - clientPermissions: ['USE_EXTERNAL_EMOJIS'], - args: [ - { - key: 'text', - prompt: 'WHaT tEXt WoUlD yOu LiKE to COnvErt?', - type: 'string', - validate: (text) => { - if (text.length < 1950) return true; - else return 'Text must be under 1950 characters.'; - }, - parse: (text) => text.toLowerCase().split('') - } - ] - }); - } + constructor(client) { + super(client, { + name: 'mocking', + aliases: ['mock'], + group: 'text-edit', + memberName: 'mocking', + description: 'SenDs TexT lIkE ThiS.', + clientPermissions: ['USE_EXTERNAL_EMOJIS'], + args: [ + { + key: 'text', + prompt: 'WHaT tEXt WoUlD yOu LiKE to COnvErt?', + type: 'string', + validate: text => { + if (text.length < 1950) return true; + return 'Text must be under 1950 characters.'; + }, + parse: text => text.toLowerCase().split('') + } + ] + }); + } - run(msg, args) { - const { text } = args; - for (let i = 0; i < text.length; i += Math.floor(Math.random() * 4)) text[i] = text[i].toUpperCase(); - return msg.say(`\u180E${text.join('')} <:sponge:318612443398144000>`); - } + run(msg, args) { + const { text } = args; + for (let i = 0; i < text.length; i += Math.floor(Math.random() * 4)) text[i] = text[i].toUpperCase(); + return msg.say(`\u180E${text.join('')} <:sponge:318612443398144000>`); + } }; diff --git a/commands/text-edit/morse.js b/commands/text-edit/morse.js index 4ffb3380..a3b7c0c3 100644 --- a/commands/text-edit/morse.js +++ b/commands/text-edit/morse.js @@ -3,29 +3,29 @@ const { letterTrans } = require('custom-translate'); const dictionary = require('../../assets/json/morse'); module.exports = class MorseCommand extends Command { - constructor(client) { - super(client, { - name: 'morse', - group: 'text-edit', - memberName: 'morse', - description: 'Converts 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; - else return 'Your text is too long.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'morse', + group: 'text-edit', + memberName: 'morse', + description: 'Converts 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 text is too long.'; + } + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = letterTrans(text.toLowerCase(), dictionary, ' '); - return msg.say(converted); - } + run(msg, args) { + const { text } = args; + const converted = letterTrans(text.toLowerCase(), dictionary, ' '); + return msg.say(converted); + } }; diff --git a/commands/text-edit/pirate.js b/commands/text-edit/pirate.js index bdba902a..568cad4e 100644 --- a/commands/text-edit/pirate.js +++ b/commands/text-edit/pirate.js @@ -3,29 +3,29 @@ const { wordTrans } = require('custom-translate'); const dictionary = require('../../assets/json/pirate'); module.exports = class PirateCommand extends Command { - constructor(client) { - super(client, { - name: 'pirate', - group: 'text-edit', - memberName: 'pirate', - description: 'Converts text to 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; - else return 'Your text is too long.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'pirate', + group: 'text-edit', + memberName: 'pirate', + description: 'Converts text to 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 text is too long.'; + } + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = wordTrans(text, dictionary); - return msg.say(`\u180E${converted}`); - } + run(msg, args) { + const { text } = args; + const converted = wordTrans(text, dictionary); + return msg.say(`\u180E${converted}`); + } }; diff --git a/commands/text-edit/repeat.js b/commands/text-edit/repeat.js index e51905a2..57902192 100644 --- a/commands/text-edit/repeat.js +++ b/commands/text-edit/repeat.js @@ -1,25 +1,25 @@ const Command = require('../../structures/Command'); module.exports = class RepeatCommand extends Command { - constructor(client) { - super(client, { - name: 'repeat', - group: 'text-edit', - memberName: 'repeat', - description: 'Repeat text over and over and over and over (etc).', - args: [ - { - key: 'text', - prompt: 'What text would you like to repeat over and over and over and over?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'repeat', + group: 'text-edit', + memberName: 'repeat', + description: 'Repeat text over and over and over and over (etc).', + args: [ + { + key: 'text', + prompt: 'What text would you like to repeat over and over and over and over?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = text.repeat(2000).substr(0, 1999); - return msg.say(`\u180E${converted}`); - } + run(msg, args) { + const { text } = args; + const converted = text.repeat(2000).substr(0, 1999); + return msg.say(`\u180E${converted}`); + } }; diff --git a/commands/text-edit/reverse.js b/commands/text-edit/reverse.js index 5393c41f..c261a216 100644 --- a/commands/text-edit/reverse.js +++ b/commands/text-edit/reverse.js @@ -1,25 +1,25 @@ const Command = require('../../structures/Command'); module.exports = class ReverseCommand extends Command { - constructor(client) { - super(client, { - name: 'reverse', - group: 'text-edit', - memberName: 'reverse', - description: 'Reverses text.', - args: [ - { - key: 'text', - prompt: 'What text would you like to reverse?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'reverse', + group: 'text-edit', + memberName: 'reverse', + description: 'Reverses text.', + args: [ + { + key: 'text', + prompt: 'What text would you like to reverse?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = text.split('').reverse().join(''); - return msg.say(`\u180E${converted}`); - } + run(msg, args) { + const { text } = args; + const converted = text.split('').reverse().join(''); + return msg.say(`\u180E${converted}`); + } }; diff --git a/commands/text-edit/say.js b/commands/text-edit/say.js index 7c922f97..c3a28299 100644 --- a/commands/text-edit/say.js +++ b/commands/text-edit/say.js @@ -1,28 +1,28 @@ const Command = require('../../structures/Command'); module.exports = class SayCommand extends Command { - constructor(client) { - super(client, { - name: 'say', - aliases: ['copy', 'echo'], - group: 'text-edit', - memberName: 'say', - description: 'Make XiaoBot say what you wish.', - guildOnly: true, - clientPermissions: ['MANAGE_MESSAGES'], - args: [ - { - key: 'text', - prompt: 'What text would you like XiaoBot to say?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'say', + aliases: ['copy', 'echo'], + group: 'text-edit', + memberName: 'say', + description: 'Make XiaoBot say what you wish.', + guildOnly: true, + clientPermissions: ['MANAGE_MESSAGES'], + args: [ + { + key: 'text', + prompt: 'What text would you like XiaoBot to say?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { text } = args; - msg.delete(); - return msg.say(`\u180E${text}`); - } + run(msg, args) { + const { text } = args; + msg.delete(); + return msg.say(`\u180E${text}`); + } }; diff --git a/commands/text-edit/temmie.js b/commands/text-edit/temmie.js index a6560851..1112381f 100644 --- a/commands/text-edit/temmie.js +++ b/commands/text-edit/temmie.js @@ -3,29 +3,29 @@ const { wordTrans } = require('custom-translate'); const dictionary = require('../../assets/json/temmie'); module.exports = class TemmieCommand extends Command { - constructor(client) { - super(client, { - name: 'temmie', - group: 'text-edit', - memberName: 'temmie', - description: 'Converts 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; - else return 'Your text is too long.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'temmie', + group: 'text-edit', + memberName: 'temmie', + description: 'Converts 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 text is too long.'; + } + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = wordTrans(text, dictionary); - return msg.say(`\u180E${converted}`); - } + run(msg, args) { + const { text } = args; + const converted = wordTrans(text, dictionary); + return msg.say(`\u180E${converted}`); + } }; diff --git a/commands/text-edit/translate.js b/commands/text-edit/translate.js index 97ae644f..296efdfb 100644 --- a/commands/text-edit/translate.js +++ b/commands/text-edit/translate.js @@ -5,65 +5,65 @@ const codes = require('../../assets/json/translate'); const { yandexKey } = require('../../config'); module.exports = class TranslateCommand extends Command { - constructor(client) { - super(client, { - name: 'translate', - group: 'text-edit', - memberName: 'translate', - description: 'Translates text to a specified language.', - details: '**Codes:** https://tech.yandex.com/translate/doc/dg/concepts/api-overview-docpage/#languages', - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'text', - prompt: 'What text would you like to translate?', - type: 'string', - validate: (text) => { - if (text.length < 500) return true; - else return 'Text must be under 500 characters.'; - } - }, - { - key: 'to', - prompt: 'Which language is being translated to?', - type: 'string', - validate: (to) => { - if (codes[to.toLowerCase()]) return true; - else return 'Invalid Language Code. Use `help translate` for a list of codes.'; - }, - parse: (to) => to.toLowerCase() - }, - { - key: 'from', - prompt: 'Which language is being translated from?', - type: 'string', - default: '', - validate: (from) => { - if (codes[from.toLowerCase()]) return true; - else return 'Invalid Language Code. Use `help translate` for a list of codes.'; - }, - parse: (from) => from.toLowerCase() - } - ] - }); - } + constructor(client) { + super(client, { + name: 'translate', + group: 'text-edit', + memberName: 'translate', + description: 'Translates text to a specified language.', + details: '**Codes:** https://tech.yandex.com/translate/doc/dg/concepts/api-overview-docpage/#languages', + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'text', + prompt: 'What text would you like to translate?', + type: 'string', + validate: text => { + if (text.length < 500) return true; + return 'Text must be under 500 characters.'; + } + }, + { + key: 'to', + prompt: 'Which language is being translated to?', + type: 'string', + validate: to => { + if (codes[to.toLowerCase()]) return true; + return 'Invalid Language Code. Use `help translate` for a list of codes.'; + }, + parse: to => to.toLowerCase() + }, + { + key: 'from', + prompt: 'Which language is being translated from?', + type: 'string', + default: '', + validate: from => { + if (codes[from.toLowerCase()]) return true; + return 'Invalid Language Code. Use `help translate` for a list of codes.'; + }, + parse: from => from.toLowerCase() + } + ] + }); + } - async run(msg, args) { - const { text, to, from } = args; - const { body } = await snekfetch - .get('https://translate.yandex.net/api/v1.5/tr.json/translate') - .query({ - key: yandexKey, - text, - lang: from ? `${from}-${to}` : to - }); - const lang = body.lang.split('-'); - const embed = new MessageEmbed() - .setColor(0x00AE86) - .addField(`❯ From: ${codes[lang[0]]}`, - text) - .addField(`❯ To: ${codes[lang[1]]}`, - body.text[0]); - return msg.embed(embed); - } + async run(msg, args) { + const { text, to, from } = args; + const { body } = await snekfetch + .get('https://translate.yandex.net/api/v1.5/tr.json/translate') + .query({ + key: yandexKey, + text, + lang: from ? `${from}-${to}` : to + }); + const lang = body.lang.split('-'); + const embed = new MessageEmbed() + .setColor(0x00AE86) + .addField(`❯ From: ${codes[lang[0]]}`, + text) + .addField(`❯ To: ${codes[lang[1]]}`, + body.text[0]); + return msg.embed(embed); + } }; diff --git a/commands/text-edit/upside-down.js b/commands/text-edit/upside-down.js index 51c017f1..16b601c0 100644 --- a/commands/text-edit/upside-down.js +++ b/commands/text-edit/upside-down.js @@ -3,26 +3,26 @@ const { letterTrans } = require('custom-translate'); const dictionary = require('../../assets/json/upside-down'); module.exports = class UpsideDownCommand extends Command { - constructor(client) { - super(client, { - name: 'upside-down', - aliases: ['udown'], - group: 'text-edit', - memberName: 'upside-down', - description: 'Flips text upside-down.', - args: [ - { - key: 'text', - prompt: 'What text would you like to flip upside-down?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'upside-down', + aliases: ['udown'], + group: 'text-edit', + memberName: 'upside-down', + description: 'Flips text upside-down.', + args: [ + { + key: 'text', + prompt: 'What text would you like to flip upside-down?', + type: 'string' + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = letterTrans(text, dictionary); - return msg.say(converted); - } + run(msg, args) { + const { text } = args; + const converted = letterTrans(text, dictionary); + return msg.say(converted); + } }; diff --git a/commands/text-edit/webhook.js b/commands/text-edit/webhook.js index a1272bde..8f1115e3 100644 --- a/commands/text-edit/webhook.js +++ b/commands/text-edit/webhook.js @@ -3,32 +3,32 @@ const snekfetch = require('snekfetch'); const { webhookURL } = require('../../config'); module.exports = class WebhookCommand extends Command { - constructor(client) { - super(client, { - name: 'webhook', - aliases: ['rin', 'rin-say'], - group: 'text-edit', - memberName: 'webhook', - description: 'Posts a message to the webhook defined in your `config.json`.', - guildOnly: true, - ownerOnly: true, - clientPermissions: ['MANAGE_MESSAGES'], - args: [ - { - key: 'content', - prompt: 'What text would you like the webhook to say?', - type: 'string' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'webhook', + aliases: ['rin', 'rin-say'], + group: 'text-edit', + memberName: 'webhook', + description: 'Posts a message to the webhook defined in your `config.json`.', + guildOnly: true, + ownerOnly: true, + clientPermissions: ['MANAGE_MESSAGES'], + args: [ + { + key: 'content', + prompt: 'What text would you like the webhook to say?', + type: 'string' + } + ] + }); + } - async run(msg, args) { - const { content } = args; - msg.delete(); - await snekfetch - .post(webhookURL) - .send({ content }); - return null; - } + async run(msg, args) { + const { content } = args; + msg.delete(); + await snekfetch + .post(webhookURL) + .send({ content }); + return null; + } }; diff --git a/commands/text-edit/zalgo.js b/commands/text-edit/zalgo.js index 5e4ad802..601a5195 100644 --- a/commands/text-edit/zalgo.js +++ b/commands/text-edit/zalgo.js @@ -2,29 +2,29 @@ const Command = require('../../structures/Command'); const zalgo = require('zalgolize'); module.exports = class ZalgoCommand extends Command { - constructor(client) { - super(client, { - name: 'zalgo', - group: 'text-edit', - memberName: 'zalgo', - description: 'Converts text to Zalgo.', - args: [ - { - key: 'text', - prompt: 'What text would you like to convert to zalgo?', - type: 'string', - validate: (text) => { - if (text.length < 500) return true; - else return 'Text must be under 500 characters.'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'zalgo', + group: 'text-edit', + memberName: 'zalgo', + description: 'Converts text to Zalgo.', + args: [ + { + key: 'text', + prompt: 'What text would you like to convert to zalgo?', + type: 'string', + validate: text => { + if (text.length < 500) return true; + return 'Text must be under 500 characters.'; + } + } + ] + }); + } - run(msg, args) { - const { text } = args; - const converted = zalgo(text); - return msg.say(`\u180E${converted}`); - } + run(msg, args) { + const { text } = args; + const converted = zalgo(text); + return msg.say(`\u180E${converted}`); + } }; diff --git a/commands/user-info/avatar.js b/commands/user-info/avatar.js index 96997460..b1787d80 100644 --- a/commands/user-info/avatar.js +++ b/commands/user-info/avatar.js @@ -1,30 +1,30 @@ const Command = require('../../structures/Command'); module.exports = class AvatarCommand extends Command { - constructor(client) { - super(client, { - name: 'avatar', - group: 'user-info', - memberName: 'avatar', - description: 'Responds with a link to a user\'s avatar.', - args: [ - { - key: 'user', - prompt: 'Which user would you like to get the avatar of?', - type: 'user', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'avatar', + group: 'user-info', + memberName: 'avatar', + description: 'Responds with a link to a user\'s avatar.', + args: [ + { + key: 'user', + prompt: 'Which user would you like to get the avatar of?', + type: 'user', + default: '' + } + ] + }); + } - run(msg, args) { - const user = args.user || msg.author; - if (!user.avatar) return msg.say('This user has no avatar.'); - const avatar = user.avatarURL({ - format: user.avatar.startsWith('a_') ? 'gif' : 'png', - size: 2048 - }); - return msg.say(avatar); - } + run(msg, args) { + const user = args.user || msg.author; + if (!user.avatar) return msg.say('This user has no avatar.'); + const avatar = user.avatarURL({ + format: user.avatar.startsWith('a_') ? 'gif' : 'png', + size: 2048 + }); + return msg.say(avatar); + } }; diff --git a/commands/user-info/user-info.js b/commands/user-info/user-info.js index ecb861f9..2f382af8 100644 --- a/commands/user-info/user-info.js +++ b/commands/user-info/user-info.js @@ -4,48 +4,48 @@ const moment = require('moment'); const statuses = require('../../assets/json/user-info'); module.exports = class UserInfoCommand extends Command { - constructor(client) { - super(client, { - name: 'user-info', - aliases: ['user', 'member', 'member-info'], - group: 'user-info', - memberName: 'user', - description: 'Responds with detailed information on a user.', - guildOnly: true, - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'member', - prompt: 'Which user would you like to get info on?', - type: 'member', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'user-info', + aliases: ['user', 'member', 'member-info'], + group: 'user-info', + memberName: 'user', + description: 'Responds with detailed information on a user.', + guildOnly: true, + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'member', + prompt: 'Which user would you like to get info on?', + type: 'member', + default: '' + } + ] + }); + } - run(msg, args) { - const member = args.member || msg.member; - const status = member.user.presence.status; - const embed = new MessageEmbed() - .setColor(member.displayHexColor) - .setThumbnail(member.user.displayAvatarURL()) - .addField('❯ Name', - member.user.tag, true) - .addField('❯ ID', - member.id, true) - .addField('❯ Discord Join Date', - moment(member.user.createdAt).format('MMMM Do YYYY h:mm:ss A')) - .addField('❯ Server Join Date', - moment(member.joinedTimestamp).format('MMMM Do YYYY h:mm:ss A')) - .addField('❯ Status', - statuses[status], true) - .addField('❯ Playing', - member.user.presence.game ? member.user.presence.game.name : 'None', true) - .addField('❯ Highest Role', - member.highestRole.name, true) - .addField('❯ Hoist Role', - member.hoistRole ? member.hoistRole.name : 'Not Hoisted', true); - return msg.embed(embed); - } + run(msg, args) { + const member = args.member || msg.member; + const status = member.user.presence.status; + const embed = new MessageEmbed() + .setColor(member.displayHexColor) + .setThumbnail(member.user.displayAvatarURL()) + .addField('❯ Name', + member.user.tag, true) + .addField('❯ ID', + member.id, true) + .addField('❯ Discord Join Date', + moment(member.user.createdAt).format('MMMM Do YYYY h:mm:ss A')) + .addField('❯ Server Join Date', + moment(member.joinedTimestamp).format('MMMM Do YYYY h:mm:ss A')) + .addField('❯ Status', + statuses[status], true) + .addField('❯ Playing', + member.user.presence.game ? member.user.presence.game.name : 'None', true) + .addField('❯ Highest Role', + member.highestRole.name, true) + .addField('❯ Hoist Role', + member.hoistRole ? member.hoistRole.name : 'Not Hoisted', true); + return msg.embed(embed); + } }; diff --git a/commands/util/donate.js b/commands/util/donate.js index 9f6caecd..2a4d67d0 100644 --- a/commands/util/donate.js +++ b/commands/util/donate.js @@ -2,21 +2,21 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class DonateCommand extends Command { - constructor(client) { - super(client, { - name: 'donate', - aliases: ['patreon'], - group: 'util', - memberName: 'donate', - description: 'Responds with Xiao\'s Patreon donation link.', - guarded: true - }); - } + constructor(client) { + super(client, { + name: 'donate', + aliases: ['patreon'], + group: 'util', + memberName: 'donate', + description: 'Responds with Xiao\'s Patreon donation link.', + guarded: true + }); + } - run(msg) { - return msg.say(stripIndents` - Contribute to XiaoBot development! - https://www.patreon.com/xiaobot - `); - } + run(msg) { + return msg.say(stripIndents` + Contribute to XiaoBot development! + https://www.patreon.com/xiaobot + `); + } }; diff --git a/commands/util/help.js b/commands/util/help.js index dd4dc03a..33acefa0 100644 --- a/commands/util/help.js +++ b/commands/util/help.js @@ -3,64 +3,64 @@ const { MessageEmbed } = require('discord.js'); const { stripIndents } = require('common-tags'); module.exports = class HelpCommand extends Command { - constructor(client) { - super(client, { - name: 'help', - aliases: ['commands'], - group: 'util', - memberName: 'help', - description: 'Displays a list of available commands, or detailed information for a specified command.', - guarded: true, - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'command', - prompt: 'Which command would you like to view the help for?', - type: 'string', - default: '' - } - ] - }); - } + constructor(client) { + super(client, { + name: 'help', + aliases: ['commands'], + group: 'util', + memberName: 'help', + description: 'Displays a list of available commands, or detailed information for a specified command.', + guarded: true, + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'command', + prompt: 'Which command would you like to view the help for?', + type: 'string', + default: '' + } + ] + }); + } - async run(msg, args) { - const { command } = args; - const commands = this.client.registry.findCommands(command, false, msg); - if (command) { - if (commands.length === 1) { - const embed = new MessageEmbed() - .setTitle(`Command ${commands[0].name}`) - .setDescription(stripIndents` - ${commands[0].description} - ${commands[0].details || ''} - `) - .addField('❯ Format', - msg.anyUsage(`${commands[0].name} ${commands[0].format ? commands[0].format : ''}`)) - .addField('❯ Aliases', - commands[0].aliases.join(', ') || 'None') - .addField('❯ Group', - commands[0].group.name); - return msg.embed(embed); - } else if (commands.length > 1) { - return msg.say(`Multiple commands found: ${commands.map((c) => c.name).join(', ')}`); - } else { - return msg.say(`Could not identify command. Use ${msg.usage(null)} to view a list of commands.`); - } - } else { - const embed = new MessageEmbed() - .setTitle('Command List') - .setDescription(`Use ${msg.usage('')} to view detailed information about a command.`) - .setColor(0x00AE86); - for (const group of this.client.registry.groups.values()) { - embed.addField(`❯ ${group.name}`, - group.commands.map((c) => c.name).join(', ') || 'None'); - } - try { - await msg.direct({ embed }); - return msg.say(':mailbox_with_mail: Sent you a DM with information.'); - } catch (err) { - return msg.say('Failed to send DM. You probably have DMs disabled.'); - } - } - } + async run(msg, args) { + const { command } = args; + const commands = this.client.registry.findCommands(command, false, msg); + if (command) { + if (commands.length === 1) { + const embed = new MessageEmbed() + .setTitle(`Command ${commands[0].name}`) + .setDescription(stripIndents` + ${commands[0].description} + ${commands[0].details || ''} + `) + .addField('❯ Format', + msg.anyUsage(`${commands[0].name} ${commands[0].format ? commands[0].format : ''}`)) + .addField('❯ Aliases', + commands[0].aliases.join(', ') || 'None') + .addField('❯ Group', + commands[0].group.name); + return msg.embed(embed); + } else if (commands.length > 1) { + return msg.say(`Multiple commands found: ${commands.map(c => c.name).join(', ')}`); + } else { + return msg.say(`Could not identify command. Use ${msg.usage(null)} to view a list of commands.`); + } + } else { + const embed = new MessageEmbed() + .setTitle('Command List') + .setDescription(`Use ${msg.usage('')} to view detailed information about a command.`) + .setColor(0x00AE86); + for (const group of this.client.registry.groups.values()) { + embed.addField(`❯ ${group.name}`, + group.commands.map(c => c.name).join(', ') || 'None'); + } + try { + await msg.direct({ embed }); + return msg.say(':mailbox_with_mail: Sent you a DM with information.'); + } catch (err) { + return msg.say('Failed to send DM. You probably have DMs disabled.'); + } + } + } }; diff --git a/commands/util/info.js b/commands/util/info.js index 2c8009f8..efffdff7 100644 --- a/commands/util/info.js +++ b/commands/util/info.js @@ -5,42 +5,42 @@ const moment = require('moment'); require('moment-duration-format'); module.exports = class InfoCommand extends Command { - constructor(client) { - super(client, { - name: 'info', - aliases: ['information', 'stats'], - group: 'util', - memberName: 'info', - description: 'Responds with detailed bot information.', - guarded: true, - clientPermissions: ['EMBED_LINKS'] - }); - } + constructor(client) { + super(client, { + name: 'info', + aliases: ['information', 'stats'], + group: 'util', + memberName: 'info', + description: 'Responds with detailed bot information.', + guarded: true, + clientPermissions: ['EMBED_LINKS'] + }); + } - async run(msg) { - const guilds = await this.client.shard.fetchClientValues('guilds.size'); - const memory = await this.client.shard.broadcastEval('process.memoryUsage().heapUsed'); - const embed = new MessageEmbed() - .setColor(0x00AE86) - .setFooter('©2017 dragonfire535#8081') - .addField('❯ Servers', - guilds.reduce((prev, val) => prev + val, 0), true) - .addField('❯ Shards', - this.client.options.shardCount, true) - .addField('❯ Commands', - this.client.registry.commands.size, true) - .addField('❯ Source Code', - '[View Here](https://github.com/dragonfire535/xiaobot)', true) - .addField('❯ Memory Usage', - `${Math.round(memory.reduce((prev, val) => prev + val, 0) / 1024 / 1024)}MB`, true) - .addField('❯ Uptime', - moment.duration(this.client.uptime).format('d[d]h[h]m[m]s[s]'), true) - .addField('❯ Version', - `v${version}`, true) - .addField('❯ Node Version', - process.version, true) - .addField('❯ Library', - '[discord.js](https://discord.js.org)[-commando](https://github.com/Gawdl3y/discord.js-commando)', true); // eslint-disable-line max-len - return msg.embed(embed); - } + async run(msg) { + const guilds = await this.client.shard.fetchClientValues('guilds.size'); + const memory = await this.client.shard.broadcastEval('process.memoryUsage().heapUsed'); + const embed = new MessageEmbed() + .setColor(0x00AE86) + .setFooter('©2017 dragonfire535#8081') + .addField('❯ Servers', + guilds.reduce((prev, val) => prev + val, 0), true) + .addField('❯ Shards', + this.client.options.shardCount, true) + .addField('❯ Commands', + this.client.registry.commands.size, true) + .addField('❯ Source Code', + '[View Here](https://github.com/dragonfire535/xiaobot)', true) + .addField('❯ Memory Usage', + `${Math.round(memory.reduce((prev, val) => prev + val, 0) / 1024 / 1024)}MB`, true) + .addField('❯ Uptime', + moment.duration(this.client.uptime).format('d[d]h[h]m[m]s[s]'), true) + .addField('❯ Version', + `v${version}`, true) + .addField('❯ Node Version', + process.version, true) + .addField('❯ Library', + '[discord.js](https://discord.js.org)[-commando](https://github.com/Gawdl3y/discord.js-commando)', true); // eslint-disable-line max-len + return msg.embed(embed); + } }; diff --git a/commands/util/invite.js b/commands/util/invite.js index 298918a6..12b316f7 100644 --- a/commands/util/invite.js +++ b/commands/util/invite.js @@ -2,23 +2,23 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class InviteCommand extends Command { - constructor(client) { - super(client, { - name: 'invite', - group: 'util', - memberName: 'invite', - description: 'Responds with an invite for the bot and an invite to the home server.', - guarded: true - }); - } + constructor(client) { + super(client, { + name: 'invite', + group: 'util', + memberName: 'invite', + description: 'Responds with an invite for the bot and an invite to the home server.', + guarded: true + }); + } - async run(msg) { - const invite = await this.client.generateInvite('1345846343'); - return msg.say(stripIndents` - Add me to your server with this link: - <${invite}> - Or, come to my server with this link: - ${this.client.options.invite} - `); - } + async run(msg) { + const invite = await this.client.generateInvite('1345846343'); + return msg.say(stripIndents` + Add me to your server with this link: + <${invite}> + Or, come to my server with this link: + ${this.client.options.invite} + `); + } }; diff --git a/commands/util/ping.js b/commands/util/ping.js index 95e91835..67af20e0 100644 --- a/commands/util/ping.js +++ b/commands/util/ping.js @@ -2,22 +2,22 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class PingCommand extends Command { - constructor(client) { - super(client, { - name: 'ping', - aliases: ['pong', 'ping-pong'], - group: 'util', - memberName: 'ping', - description: 'Checks the bot\'s ping to the Discord server.', - guarded: true - }); - } + constructor(client) { + super(client, { + name: 'ping', + aliases: ['pong', 'ping-pong'], + group: 'util', + memberName: 'ping', + description: 'Checks the bot\'s ping to the Discord server.', + guarded: true + }); + } - async run(msg) { - const message = await msg.say('Pinging...'); - return message.edit(stripIndents` - :ping_pong: Pong! \`${Math.round(message.createdTimestamp - msg.createdTimestamp)}ms\` - Heartbeat: \`${Math.round(this.client.ping)}ms\` - `); - } + async run(msg) { + const message = await msg.say('Pinging...'); + return message.edit(stripIndents` + :ping_pong: Pong! \`${Math.round(message.createdTimestamp - msg.createdTimestamp)}ms\` + Heartbeat: \`${Math.round(this.client.ping)}ms\` + `); + } }; diff --git a/commands/util/setting-help.js b/commands/util/setting-help.js index b940f956..0d2656db 100644 --- a/commands/util/setting-help.js +++ b/commands/util/setting-help.js @@ -2,25 +2,25 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); module.exports = class SettingHelpCommand extends Command { - constructor(client) { - super(client, { - name: 'setting-help', - group: 'util', - memberName: 'setting-help', - description: 'View help on how to set up settings.', - guildOnly: true, - guarded: true - }); - } + constructor(client) { + super(client, { + name: 'setting-help', + group: 'util', + memberName: 'setting-help', + description: 'View help on how to set up settings.', + guildOnly: true, + guarded: true + }); + } - run(msg) { - return msg.say(stripIndents` - **Invite Guard:** Place \`\` in your default channel's topic. (${msg.guild.defaultChannel}) - **Mod Log Channel:** Place \`\` in a channel's topic. - **Portal Channel:** Place \`\` in a channel's topic. - **Member Log Channel:** Place \`\` in a channel's topic. - **Custom Join Message:** Place \`message\` in the Member Log's Channel. - **Custom Leave Message:** Place \`message\` in the Member Log's Channel. - `); - } + run(msg) { + return msg.say(stripIndents` + **Invite Guard:** Place \`\` in your default channel's topic. (${msg.guild.defaultChannel}) + **Mod Log Channel:** Place \`\` in a channel's topic. + **Portal Channel:** Place \`\` in a channel's topic. + **Member Log Channel:** Place \`\` in a channel's topic. + **Custom Join Message:** Place \`message\` in the Member Log's Channel. + **Custom Leave Message:** Place \`message\` in the Member Log's Channel. + `); + } }; diff --git a/commands/util/shard-info.js b/commands/util/shard-info.js index cc145c3a..0b009c7a 100644 --- a/commands/util/shard-info.js +++ b/commands/util/shard-info.js @@ -4,43 +4,43 @@ const moment = require('moment'); require('moment-duration-format'); module.exports = class ShardInfoCommand extends Command { - constructor(client) { - super(client, { - name: 'shard-info', - aliases: ['shard', 'shard-stats'], - group: 'util', - memberName: 'shard-info', - description: 'Responds with detailed information for a specific Shard.', - guarded: true, - clientPermissions: ['EMBED_LINKS'], - args: [ - { - key: 'shard', - prompt: 'Which Shard would you like to get data for?', - type: 'integer', - validate: (shard) => { - if (shard < this.client.options.shardCount && shard > -1) return true; - else return 'Invalid Shard ID'; - } - } - ] - }); - } + constructor(client) { + super(client, { + name: 'shard-info', + aliases: ['shard', 'shard-stats'], + group: 'util', + memberName: 'shard-info', + description: 'Responds with detailed information for a specific Shard.', + guarded: true, + clientPermissions: ['EMBED_LINKS'], + args: [ + { + key: 'shard', + prompt: 'Which Shard would you like to get data for?', + type: 'integer', + validate: shard => { + if (shard < this.client.options.shardCount && shard > -1) return true; + return 'Invalid Shard ID'; + } + } + ] + }); + } - async run(msg, args) { - const { shard } = args; - const memory = await this.client.shard.broadcastEval('process.memoryUsage().heapUsed'); - const uptime = await this.client.shard.fetchClientValues('uptime'); - const guilds = await this.client.shard.fetchClientValues('guilds.size'); - const embed = new MessageEmbed() - .setTitle(`Shard ${shard}`) - .setColor(0x00AE86) - .addField('❯ Servers', - guilds[shard], true) - .addField('❯ Memory Usage', - `${Math.round(memory[shard] / 1024 / 1024)}MB`, true) - .addField('❯ Uptime', - moment.duration(uptime[shard]).format('d[d]h[h]m[m]s[s]'), true); - return msg.embed(embed); - } + async run(msg, args) { + const { shard } = args; + const memory = await this.client.shard.broadcastEval('process.memoryUsage().heapUsed'); + const uptime = await this.client.shard.fetchClientValues('uptime'); + const guilds = await this.client.shard.fetchClientValues('guilds.size'); + const embed = new MessageEmbed() + .setTitle(`Shard ${shard}`) + .setColor(0x00AE86) + .addField('❯ Servers', + guilds[shard], true) + .addField('❯ Memory Usage', + `${Math.round(memory[shard] / 1024 / 1024)}MB`, true) + .addField('❯ Uptime', + moment.duration(uptime[shard]).format('d[d]h[h]m[m]s[s]'), true); + return msg.embed(embed); + } }; diff --git a/commands/util/uptime.js b/commands/util/uptime.js index d025d989..9f15d965 100644 --- a/commands/util/uptime.js +++ b/commands/util/uptime.js @@ -3,17 +3,17 @@ const moment = require('moment'); require('moment-duration-format'); module.exports = class UptimeCommand extends Command { - constructor(client) { - super(client, { - name: 'uptime', - group: 'util', - memberName: 'uptime', - description: 'Responds with how long the bot has been active on this Shard.', - guarded: true - }); - } + constructor(client) { + super(client, { + name: 'uptime', + group: 'util', + memberName: 'uptime', + description: 'Responds with how long the bot has been active on this Shard.', + guarded: true + }); + } - run(msg) { - return msg.say(moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')); - } + run(msg) { + return msg.say(moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')); + } }; diff --git a/commands/util/upvoters.js b/commands/util/upvoters.js index cfbca4ff..9b4b3798 100644 --- a/commands/util/upvoters.js +++ b/commands/util/upvoters.js @@ -4,28 +4,28 @@ const { stripIndents } = require('common-tags'); const { dbotsOrgKey } = require('../../config'); module.exports = class UpvotersCommand extends Command { - constructor(client) { - super(client, { - name: 'upvoters', - aliases: ['upvote', 'updoot'], - group: 'util', - memberName: 'upvoters', - description: 'Responds with Xiao\'s upvoters on Discord Bots.', - guarded: true - }); - } + constructor(client) { + super(client, { + name: 'upvoters', + aliases: ['upvote', 'updoot'], + group: 'util', + memberName: 'upvoters', + description: 'Responds with Xiao\'s upvoters on Discord Bots.', + guarded: true + }); + } - async run(msg) { - const { body } = await snekfetch - .get(`https://discordbots.org/api/bots/${this.client.user.id}/votes`) - .set({ Authorization: dbotsOrgKey }); - const haste = await snekfetch - .post('https://hastebin.com/documents') - .send(body.map((user) => `${user.username}#${user.discriminator}`).join('\n')); - return msg.say(stripIndents` - Upvote Xiao and get rewards while joining ${body.length} others! - - List of Upvoters: - `); - } + async run(msg) { + const { body } = await snekfetch + .get(`https://discordbots.org/api/bots/${this.client.user.id}/votes`) + .set({ Authorization: dbotsOrgKey }); + const haste = await snekfetch + .post('https://hastebin.com/documents') + .send(body.map(user => `${user.username}#${user.discriminator}`).join('\n')); + return msg.say(stripIndents` + Upvote Xiao and get rewards while joining ${body.length} others! + + List of Upvoters: + `); + } }; diff --git a/html/carbondesc.html b/html/carbondesc.html index 091adb5c..3afac129 100644 --- a/html/carbondesc.html +++ b/html/carbondesc.html @@ -1,24 +1,25 @@
- - - XiaoBot, your personal server companion... - -
- Discord Server -
-

-
- Moderation, Site Searching, Soundboard, Avatar Editing, Games, and more! -
+ + + XiaoBot, your personal server companion... + +
+ Discord Server + +
+

+
+ Moderation, Site Searching, Soundboard, Avatar Editing, Games, and more! +
diff --git a/html/carbonfeat.html b/html/carbonfeat.html index 071a89ee..e9bb5662 100644 --- a/html/carbonfeat.html +++ b/html/carbonfeat.html @@ -1,73 +1,73 @@
- -
-

Features

-
    -
  1. Avatar image Editing, including Bob Ross, RIP, Wanted, Triggered, Steam Card, and more!
  2. -
  3. Profile Trading Cards, with random rarity!
  4. -
  5. Battle! Challenge your friends or the AI in real turn-based matches!
  6. -
  7. Fun Games including Hangman, Lottery, Math, Quiz, Rock Paper Scissors, Slots, and Typing!
  8. -
  9. Server, User, and Role Information!
  10. -
  11. Minecraft Achievement Generation!
  12. -
  13. Meme Generation!
  14. -
  15. Pokémon Fusion!
  16. -
  17. Moderation Commands including Ban/Kick/Softban/Unban/Warn, Lockdown, and Prune, with Logging!
  18. -
  19. Currency and Temperature Conversion!
  20. -
  21. Math Calculator!
  22. -
  23. Tons of Secret Easter Eggs to discover!
  24. -
  25. Horoscopes!
  26. -
  27. LMGTFY Link Generation!
  28. -
  29. Strawpoll Generation!
  30. -
  31. Events that Happened today in history!
  32. -
  33. Would you rather questions!
  34. -
  35. Random Cats, Dogs, VOCALOID Songs, and Xiao Pai Images!
  36. -
  37. 8 Ball, Choose, Coin Flip, Magic Conch, Roll, and Member Roulette!
  38. -
  39. Waifu and Ship Rating!
  40. -
  41. Random Compliments, Chuck Norris Jokes, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
  42. -
  43. Roleplay Commands!
  44. -
  45. Search Various sites including:
  46. -
      -
    1. My Anime List
    2. -
    3. Discord Bots
    4. -
    5. Bulbapedia
    6. -
    7. Danbooru
    8. -
    9. Wordnik
    10. -
    11. Yahoo Weather
    12. -
    13. Gelbooru
    14. -
    15. Giphy
    16. -
    17. Konachan
    18. -
    19. Google Maps
    20. -
    21. Neopets
    22. -
    23. NPM
    24. -
    25. osu!
    26. -
    27. Pokédex
    28. -
    29. Recipe Puppy
    30. -
    31. Reddit
    32. -
    33. Rule34
    34. -
    35. SoundCloud
    36. -
    37. Urban Dictionary
    38. -
    39. Wattpad
    40. -
    41. Wikia (Any Wiki)
    42. -
    43. Wikipedia
    44. -
    45. YouTube
    46. -
    47. Yu-Gi-Oh!
    48. -
    -
  47. Random, Daily, and Specific XKCD Comics!
  48. -
  49. Translate Text to almost 100 languages!
  50. -
  51. Binary, Morse, Pirate, and Temmie Translators!
  52. -
  53. Cowsay, Embed, Reverse, Upside Down, and Zalgo Text!
  54. -
  55. Member Join/Leave Logging (with Customization)!
  56. -
  57. Invite Protection!
  58. -
  59. And so so so much more!
  60. -
-
+ +
+

Features

+
    +
  1. Avatar image Editing, including Bob Ross, RIP, Wanted, Triggered, Steam Card, and more!
  2. +
  3. Profile Trading Cards, with random rarity!
  4. +
  5. Battle! Challenge your friends or the AI in real turn-based matches!
  6. +
  7. Fun Games including Hangman, Lottery, Math, Quiz, Rock Paper Scissors, Slots, and Typing!
  8. +
  9. Server, User, and Role Information!
  10. +
  11. Minecraft Achievement Generation!
  12. +
  13. Meme Generation!
  14. +
  15. Pokémon Fusion!
  16. +
  17. Moderation Commands including Ban/Kick/Softban/Unban/Warn, Lockdown, and Prune, with Logging!
  18. +
  19. Currency and Temperature Conversion!
  20. +
  21. Math Calculator!
  22. +
  23. Tons of Secret Easter Eggs to discover!
  24. +
  25. Horoscopes!
  26. +
  27. LMGTFY Link Generation!
  28. +
  29. Strawpoll Generation!
  30. +
  31. Events that Happened today in history!
  32. +
  33. Would you rather questions!
  34. +
  35. Random Cats, Dogs, VOCALOID Songs, and Xiao Pai Images!
  36. +
  37. 8 Ball, Choose, Coin Flip, Magic Conch, Roll, and Member Roulette!
  38. +
  39. Waifu and Ship Rating!
  40. +
  41. Random Compliments, Chuck Norris Jokes, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
  42. +
  43. Roleplay Commands!
  44. +
  45. Search Various sites including:
  46. +
      +
    1. My Anime List
    2. +
    3. Discord Bots
    4. +
    5. Bulbapedia
    6. +
    7. Danbooru
    8. +
    9. Wordnik
    10. +
    11. Yahoo Weather
    12. +
    13. Gelbooru
    14. +
    15. Giphy
    16. +
    17. Konachan
    18. +
    19. Google Maps
    20. +
    21. Neopets
    22. +
    23. NPM
    24. +
    25. osu!
    26. +
    27. Pokédex
    28. +
    29. Recipe Puppy
    30. +
    31. Reddit
    32. +
    33. Rule34
    34. +
    35. SoundCloud
    36. +
    37. Urban Dictionary
    38. +
    39. Wattpad
    40. +
    41. Wikia (Any Wiki)
    42. +
    43. Wikipedia
    44. +
    45. YouTube
    46. +
    47. Yu-Gi-Oh!
    48. +
    +
  47. Random, Daily, and Specific XKCD Comics!
  48. +
  49. Translate Text to almost 100 languages!
  50. +
  51. Binary, Morse, Pirate, and Temmie Translators!
  52. +
  53. Cowsay, Embed, Reverse, Upside Down, and Zalgo Text!
  54. +
  55. Member Join/Leave Logging (with Customization)!
  56. +
  57. Invite Protection!
  58. +
  59. And so so so much more!
  60. +
+
diff --git a/html/carbonuse.html b/html/carbonuse.html index 32daaa34..24d2b35e 100644 --- a/html/carbonuse.html +++ b/html/carbonuse.html @@ -1,22 +1,22 @@
- -
-

Notes

-
    -
  1. Moderation commands require a channel with <modlog> in the topic to send Ban/Kick/Softban/Unban/Warn logs.
  2. -
  3. To use member join/leave logging, place <memberlog> in the channel topic. Custom messages can be set with <joinmessage>messagegoeshere</joinmessage> and <leavemessage>messagegoeshere</leavemessage>
  4. -
  5. To use invite guard, place <inviteguard> in the default channel topic.
  6. -
  7. Use x;help to view a command list
  8. -
  9. Visit my home server for more support, or for updates, or if you just want to hang out.
  10. -
-
+ +
+

Notes

+
    +
  1. Moderation commands require a channel with <modlog> in the topic to send Ban/Kick/Softban/Unban/Warn logs.
  2. +
  3. To use member join/leave logging, place <memberlog> in the channel topic. Custom messages can be set with <joinmessage>messagegoeshere</joinmessage> and <leavemessage>messagegoeshere</leavemessage>
  4. +
  5. To use invite guard, place <inviteguard> in the default channel topic.
  6. +
  7. Use x;help to view a command list
  8. +
  9. Visit my home server for more support, or for updates, or if you just want to hang out.
  10. +
+
diff --git a/html/discordbots.html b/html/discordbots.html index af2d5e1d..bf2c9656 100644 --- a/html/discordbots.html +++ b/html/discordbots.html @@ -1,78 +1,78 @@
- - XiaoBot, your personal server companion... - -

-
-

Source Code

- Discord Server -
-

Features

+ + XiaoBot, your personal server companion... + +

+
+

Source Code

+ Discord Server +
+

Features

+
    +
  1. Avatar image Editing, including Bob Ross, RIP, Wanted, Triggered, Steam Card, and more!
  2. +
  3. Profile Trading Cards, with random rarity!
  4. +
  5. Battle! Challenge your friends or the AI in real turn-based matches!
  6. +
  7. Fun Games including Hangman, Lottery, Math, Quiz, Rock Paper Scissors, Slots, and Typing!
  8. +
  9. Server, User, and Role Information!
  10. +
  11. Minecraft Achievement Generation!
  12. +
  13. Meme Generation!
  14. +
  15. Pokémon Fusion!
  16. +
  17. Moderation Commands including Ban/Kick/Softban/Unban/Warn, Lockdown, and Prune, with Logging!
  18. +
  19. Currency and Temperature Conversion!
  20. +
  21. Math Calculator!
  22. +
  23. Tons of Secret Easter Eggs to discover!
  24. +
  25. Horoscopes!
  26. +
  27. LMGTFY Link Generation!
  28. +
  29. Strawpoll Generation!
  30. +
  31. Events that Happened today in history!
  32. +
  33. Would you rather questions!
  34. +
  35. Random Cats, Dogs, VOCALOID Songs, and Xiao Pai Images!
  36. +
  37. 8 Ball, Choose, Coin Flip, Magic Conch, Roll, and Member Roulette!
  38. +
  39. Waifu and Ship Rating!
  40. +
  41. Random Compliments, Chuck Norris Jokes, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
  42. +
  43. Roleplay Commands!
  44. +
  45. Search Various sites including:
    1. -
    2. Avatar image Editing, including Bob Ross, RIP, Wanted, Triggered, Steam Card, and more!
    3. -
    4. Profile Trading Cards, with random rarity!
    5. -
    6. Battle! Challenge your friends or the AI in real turn-based matches!
    7. -
    8. Fun Games including Hangman, Lottery, Math, Quiz, Rock Paper Scissors, Slots, and Typing!
    9. -
    10. Server, User, and Role Information!
    11. -
    12. Minecraft Achievement Generation!
    13. -
    14. Meme Generation!
    15. -
    16. Pokémon Fusion!
    17. -
    18. Moderation Commands including Ban/Kick/Softban/Unban/Warn, Lockdown, and Prune, with Logging!
    19. -
    20. Currency and Temperature Conversion!
    21. -
    22. Math Calculator!
    23. -
    24. Tons of Secret Easter Eggs to discover!
    25. -
    26. Horoscopes!
    27. -
    28. LMGTFY Link Generation!
    29. -
    30. Strawpoll Generation!
    31. -
    32. Events that Happened today in history!
    33. -
    34. Would you rather questions!
    35. -
    36. Random Cats, Dogs, VOCALOID Songs, and Xiao Pai Images!
    37. -
    38. 8 Ball, Choose, Coin Flip, Magic Conch, Roll, and Member Roulette!
    39. -
    40. Waifu and Ship Rating!
    41. -
    42. Random Compliments, Chuck Norris Jokes, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
    43. -
    44. Roleplay Commands!
    45. -
    46. Search Various sites including:
    47. -
        -
      1. My Anime List
      2. -
      3. Discord Bots
      4. -
      5. Bulbapedia
      6. -
      7. Danbooru
      8. -
      9. Wordnik
      10. -
      11. Yahoo Weather
      12. -
      13. Gelbooru
      14. -
      15. Giphy
      16. -
      17. Konachan
      18. -
      19. Google Maps
      20. -
      21. Neopets
      22. -
      23. NPM
      24. -
      25. osu!
      26. -
      27. Pokédex
      28. -
      29. Recipe Puppy
      30. -
      31. Reddit
      32. -
      33. Rule34
      34. -
      35. SoundCloud
      36. -
      37. Urban Dictionary
      38. -
      39. Wattpad
      40. -
      41. Wikia (Any Wiki)
      42. -
      43. Wikipedia
      44. -
      45. YouTube
      46. -
      47. Yu-Gi-Oh!
      48. -
      -
    48. Random, Daily, and Specific XKCD Comics!
    49. -
    50. Translate Text to almost 100 languages!
    51. -
    52. Binary, Morse, Pirate, and Temmie Translators!
    53. -
    54. Cowsay, Embed, Reverse, Upside Down, and Zalgo Text!
    55. -
    56. Member Join/Leave Logging (with Customization)!
    57. -
    58. Invite Protection!
    59. -
    60. And so so so much more!
    61. - -
    -

    Notes

    -
      -
    1. Moderation commands require a channel with <modlog> in the topic to send Ban/Kick/Softban/Unban/Warn logs.
    2. -
    3. To use member join/leave logging, place <memberlog> in the channel topic. Custom messages can be set with <joinmessage>messagegoeshere</joinmessage> and <leavemessage>messagegoeshere</leavemessage>
    4. -
    5. To use invite guard, place <inviteguard> in the default channel topic.
    6. -
    7. Use x;help to view a command list
    8. -
    9. Visit my home server for more support, or for updates, or if you just want to hang out.
    10. +
    11. My Anime List
    12. +
    13. Discord Bots
    14. +
    15. Bulbapedia
    16. +
    17. Danbooru
    18. +
    19. Wordnik
    20. +
    21. Yahoo Weather
    22. +
    23. Gelbooru
    24. +
    25. Giphy
    26. +
    27. Konachan
    28. +
    29. Google Maps
    30. +
    31. Neopets
    32. +
    33. NPM
    34. +
    35. osu!
    36. +
    37. Pokédex
    38. +
    39. Recipe Puppy
    40. +
    41. Reddit
    42. +
    43. Rule34
    44. +
    45. SoundCloud
    46. +
    47. Urban Dictionary
    48. +
    49. Wattpad
    50. +
    51. Wikia (Any Wiki)
    52. +
    53. Wikipedia
    54. +
    55. YouTube
    56. +
    57. Yu-Gi-Oh!
    +
  46. Random, Daily, and Specific XKCD Comics!
  47. +
  48. Translate Text to almost 100 languages!
  49. +
  50. Binary, Morse, Pirate, and Temmie Translators!
  51. +
  52. Cowsay, Embed, Reverse, Upside Down, and Zalgo Text!
  53. +
  54. Member Join/Leave Logging (with Customization)!
  55. +
  56. Invite Protection!
  57. +
  58. And so so so much more!
  59. + +
+

Notes

+
    +
  1. Moderation commands require a channel with <modlog> in the topic to send Ban/Kick/Softban/Unban/Warn logs.
  2. +
  3. To use member join/leave logging, place <memberlog> in the channel topic. Custom messages can be set with <joinmessage>messagegoeshere</joinmessage> and <leavemessage>messagegoeshere</leavemessage>
  4. +
  5. To use invite guard, place <inviteguard> in the default channel topic.
  6. +
  7. Use x;help to view a command list
  8. +
  9. Visit my home server for more support, or for updates, or if you just want to hang out.
  10. +
diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 93c88c95..00000000 --- a/package-lock.json +++ /dev/null @@ -1,801 +0,0 @@ -{ - "name": "xiaobot", - "version": "27.8.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/node": { - "version": "6.0.79", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.79.tgz", - "integrity": "sha512-7F3/P6MkTPA0QxOstRqfcnoReCUy5V/QG92cyBoZSPnqdX44L8TtNELSVfN56gAttm3YWj9cEi8FRIPVq0WmeQ==" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "aproba": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz", - "integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==" - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" - } - }, - "babel-runtime": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", - "integrity": "sha1-M7mOql1IK7AajRqmtDetKwGuxBw=", - "requires": { - "core-js": "2.4.1", - "regenerator-runtime": "0.10.5" - } - }, - "bindings": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", - "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=" - }, - "bl": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", - "requires": { - "readable-stream": "2.3.3" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "bufferutil": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-3.0.2.tgz", - "integrity": "sha512-CGk0C62APhIdbcKwP6Pr293Pba/u9xvrC/X4D6YQZzxhSjb+/rHFYSCorEWIxLo6HbwTuy7SEsgTmsvBCn3dKw==", - "requires": { - "bindings": "1.2.1", - "nan": "2.6.2", - "prebuild-install": "2.2.0" - }, - "dependencies": { - "prebuild-install": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.2.0.tgz", - "integrity": "sha1-VZNHVqMrrIdHOQykT/Zjzui5m2k=", - "requires": { - "expand-template": "1.0.3", - "github-from-package": "0.0.0", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "node-abi": "2.0.3", - "noop-logger": "0.1.1", - "npmlog": "4.1.2", - "os-homedir": "1.0.2", - "pump": "1.0.2", - "rc": "1.2.1", - "simple-get": "1.4.3", - "tar-fs": "1.15.3", - "tunnel-agent": "0.6.0", - "xtend": "4.0.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "5.1.1" - } - } - } - }, - "canvas": { - "version": "github:automattic/node-canvas#25b03f3e34bf25ca62f9069ebddc9b9335d9b6df", - "requires": { - "nan": "2.6.2", - "parse-css-font": "2.0.2", - "units-css": "0.4.0" - } - }, - "cheerio": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", - "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", - "requires": { - "css-select": "1.2.0", - "dom-serializer": "0.1.0", - "entities": "1.1.1", - "htmlparser2": "3.9.2", - "lodash": "4.17.4", - "parse5": "3.0.2" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "common-tags": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.4.0.tgz", - "integrity": "sha1-EYe+Tz1M8MBCfUP3Tu8fc1AWFMA=", - "requires": { - "babel-runtime": "6.25.0" - } - }, - "complex.js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.0.4.tgz", - "integrity": "sha512-Syl95HpxUTS0QjwNxencZsKukgh1zdS9uXeXX2Us0pHaqBR6kiZZi0AkZ9VpZFwHJyVIUVzI4EumjWdXP3fy6w==" - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "css-font-size-keywords": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-font-size-keywords/-/css-font-size-keywords-1.0.0.tgz", - "integrity": "sha1-hUh1rOmspqjS7g00WkSq6btttss=" - }, - "css-font-stretch-keywords": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-font-stretch-keywords/-/css-font-stretch-keywords-1.0.1.tgz", - "integrity": "sha1-UM7puboDH7XJUtRyMTnx4Qe1SxA=" - }, - "css-font-style-keywords": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-font-style-keywords/-/css-font-style-keywords-1.0.1.tgz", - "integrity": "sha1-XDUygT9jtKHelU0TzqhqtDM0CeQ=" - }, - "css-font-weight-keywords": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-font-weight-keywords/-/css-font-weight-keywords-1.0.0.tgz", - "integrity": "sha1-m8BGcayFvHJLV07106yWsNYE/Zc=" - }, - "css-global-keywords": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-global-keywords/-/css-global-keywords-1.0.1.tgz", - "integrity": "sha1-cqmupyeW0Bmx0qMlLeTlqqN+Smk=" - }, - "css-list-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-list-helpers/-/css-list-helpers-1.0.1.tgz", - "integrity": "sha1-//VxkiAtuDJAxBaG+RnkSacCT30=", - "requires": { - "tcomb": "2.7.0" - } - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "requires": { - "boolbase": "1.0.0", - "css-what": "2.1.0", - "domutils": "1.5.1", - "nth-check": "1.0.1" - } - }, - "css-system-font-keywords": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-system-font-keywords/-/css-system-font-keywords-1.0.0.tgz", - "integrity": "sha1-hcbwhquk6zLFcaMIav/ENLhII+0=" - }, - "css-what": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" - }, - "custom-translate": { - "version": "github:dragonfire535/custom-translate#9adf97e13518e92cab0032ac4a3934715fddceb7" - }, - "decimal.js": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-7.2.3.tgz", - "integrity": "sha512-AoFI37QS0S87Ft0r3Bdz4q9xSpm1Paa9lSeKLXgMPk/u/+QPIM5Gy4DHcZQS1seqPJH4gHLauPGn347z0HbsrA==" - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "discord.js": { - "version": "github:hydrabolt/discord.js#11556c0b3b0317341da49875d072f732a054f2f1", - "requires": { - "long": "3.2.0", - "prism-media": "0.0.1", - "snekfetch": "3.2.4", - "tweetnacl": "1.0.0", - "ws": "3.0.0" - } - }, - "discord.js-commando": { - "version": "github:gawdl3y/discord.js-commando#de635acde97359828c97db237895e728f00e7fef", - "requires": { - "common-tags": "1.4.0", - "escape-string-regexp": "1.0.5", - "require-all": "2.2.0" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" - } - } - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" - }, - "domhandler": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", - "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", - "requires": { - "domelementtype": "1.3.0" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" - } - }, - "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", - "requires": { - "once": "1.4.0" - } - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" - }, - "erlpack": { - "version": "github:hammerandchisel/erlpack#ad84c69355f03770a84d4bd8a20b981dd168fcf4", - "requires": { - "bindings": "1.2.1", - "nan": "2.6.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "expand-template": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.0.3.tgz", - "integrity": "sha1-bDAzIxd6YrGyLAcCefeGEoe2mxo=" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "1.1.2", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", - "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.4.1", - "domutils": "1.5.1", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isnumeric": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/isnumeric/-/isnumeric-0.2.0.tgz", - "integrity": "sha1-ojR7o2DeGeM9D/1ZD933dVy/LmQ=" - }, - "javascript-natural-sort": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k=" - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" - }, - "mathjs": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-3.14.2.tgz", - "integrity": "sha1-u3m33IeLf1hs5AirBnqaQtsuei0=", - "requires": { - "complex.js": "2.0.4", - "decimal.js": "7.2.3", - "fraction.js": "4.0.2", - "javascript-natural-sort": "0.7.1", - "seed-random": "2.2.0", - "tiny-emitter": "2.0.0", - "typed-function": "0.10.5" - }, - "dependencies": { - "fraction.js": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.2.tgz", - "integrity": "sha512-OswcigOSil3vYXgrPSx4NCaSyPikXqVNYN/4CyhS0ucVOJ4GVYr6KQQLLcAudvS/4bBOzxqJ3XIsFaaMjl98ZQ==" - } - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "moment": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", - "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" - }, - "moment-duration-format": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/moment-duration-format/-/moment-duration-format-1.3.0.tgz", - "integrity": "sha1-VBdxtfh6BJzGVUBHXTrZZnN9aQg=" - }, - "nan": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", - "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" - }, - "node-abi": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.0.3.tgz", - "integrity": "sha1-DKZ+XmZ7jhNDVJyhcVOoFdC7/ao=" - }, - "noop-logger": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", - "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "nth-check": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", - "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", - "requires": { - "boolbase": "1.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "parse-css-font": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/parse-css-font/-/parse-css-font-2.0.2.tgz", - "integrity": "sha1-e2CwYHBaJam5C38O1JPlgjJIplI=", - "requires": { - "css-font-size-keywords": "1.0.0", - "css-font-stretch-keywords": "1.0.1", - "css-font-style-keywords": "1.0.1", - "css-font-weight-keywords": "1.0.0", - "css-global-keywords": "1.0.1", - "css-list-helpers": "1.0.1", - "css-system-font-keywords": "1.0.0", - "tcomb": "2.7.0", - "unquote": "1.1.0" - } - }, - "parse5": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.2.tgz", - "integrity": "sha1-Be/1fw70V3+xRKefi5qWemzERRA=", - "requires": { - "@types/node": "6.0.79" - } - }, - "prism-media": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.1.tgz", - "integrity": "sha1-o0JcnKvVDRxsAuVDlBoRiVZnvRA=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "pump": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", - "integrity": "sha1-Oz7mUS+U8OV1U4wXmV+fFpkKXVE=", - "requires": { - "end-of-stream": "1.4.0", - "once": "1.4.0" - } - }, - "rc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", - "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - } - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" - }, - "require-all": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/require-all/-/require-all-2.2.0.tgz", - "integrity": "sha1-tEIMIzrAKC0P9Jsnf7iAqLXeCJQ=" - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "seed-random": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz", - "integrity": "sha1-KpsZ4lCoFwmSMaW5mk2vgLf77VQ=" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "simple-get": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-1.4.3.tgz", - "integrity": "sha1-6XVe2kB+ltpAxeUVjJ6jezO+y+s=", - "requires": { - "once": "1.4.0", - "unzip-response": "1.0.2", - "xtend": "4.0.1" - } - }, - "snekfetch": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.2.4.tgz", - "integrity": "sha512-vDZYK3cgt0mFLeAzQXNGgAc/8G3AnbqbfuBt1FOaLgYt42BWEi3z3U5tSLGEs+bvO6d5nU7mBbhpi8RIVF2ztw==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "tar-fs": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.15.3.tgz", - "integrity": "sha1-7M+TXpQUk9gVECjmNuUc5MPKfyA=", - "requires": { - "chownr": "1.0.1", - "mkdirp": "0.5.1", - "pump": "1.0.2", - "tar-stream": "1.5.4" - } - }, - "tar-stream": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", - "integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", - "requires": { - "bl": "1.2.1", - "end-of-stream": "1.4.0", - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - }, - "tcomb": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tcomb/-/tcomb-2.7.0.tgz", - "integrity": "sha1-ENYpWAQWaaXVNWe5pO6M3iKxwrA=" - }, - "tiny-emitter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.0.tgz", - "integrity": "sha1-utMnrbGAS0KiMa+nQVMr2ITNCa0=" - }, - "trials": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trials/-/trials-1.0.0.tgz", - "integrity": "sha1-ip+6KajXypcV6/TdtSoCgvaKgfw=" - }, - "tsubaki": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tsubaki/-/tsubaki-1.2.0.tgz", - "integrity": "sha1-JTB3p+A270inOVKhwDyGQiA1FfY=" - }, - "tweetnacl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz", - "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins=" - }, - "typed-function": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-0.10.5.tgz", - "integrity": "sha1-Lg8Yq9BlIZ+raUpEamXG0ZgYMsA=" - }, - "ultron": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz", - "integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ=" - }, - "units-css": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/units-css/-/units-css-0.4.0.tgz", - "integrity": "sha1-1iKGU6UZg9fBb/KPi53Dsf/tOgc=", - "requires": { - "isnumeric": "0.2.0", - "viewport-dimensions": "0.2.0" - } - }, - "unquote": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.0.tgz", - "integrity": "sha1-mOH8YItrhUx1r7G5WvwJm6adlC8=" - }, - "unzip-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", - "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "viewport-dimensions": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz", - "integrity": "sha1-3nQHR9tTh/0XJfUXXpG6x2r982w=" - }, - "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "ws": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.0.0.tgz", - "integrity": "sha1-mN2wAFbIOQy3Ued4h4hJf5kQO2w=", - "requires": { - "safe-buffer": "5.0.1", - "ultron": "1.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" - } - } - }, - "xml2js": { - "version": "0.4.17", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.17.tgz", - "integrity": "sha1-F76T6q4/O3eTWceVtBlwWogX6Gg=", - "requires": { - "sax": "1.2.4", - "xmlbuilder": "4.2.1" - } - }, - "xmlbuilder": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", - "integrity": "sha1-qlijBBoGb5DqoWwvU4n/GfP0YaU=", - "requires": { - "lodash": "4.17.4" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "zalgolize": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/zalgolize/-/zalgolize-1.2.4.tgz", - "integrity": "sha1-r1QkPJ4E6mjNOPcFHxCsS0RF9fY=", - "requires": { - "minimist": "1.2.0", - "trials": "1.0.0" - } - } - } -} diff --git a/package.json b/package.json index 3eff56f8..80487d5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "27.9.0", + "version": "27.9.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": { @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/dragonfire535/xiaobot#readme", "engines": { - "node": ">=8.1.4" + "node": ">=8.0.0" }, "dependencies": { "bufferutil": "^3.0.2", @@ -47,6 +47,16 @@ "zalgolize": "^1.2.4" }, "devDependencies": { - "eslint": "^4.2.0" + "eslint": "^4.2.0", + "eslint-config-aqua": "^1.4.1" + }, + "eslintConfig": { + "extends": "aqua", + "rules": { + "camelcase": "off", + "id-length": "off", + "no-await-in-loop": "off", + "no-console": "off" + } } } diff --git a/structures/Command.js b/structures/Command.js index d0b57e30..ca94076f 100644 --- a/structures/Command.js +++ b/structures/Command.js @@ -2,44 +2,44 @@ const { Command } = require('discord.js-commando'); const perms = require('../assets/json/permissions'); class XiaoCommand extends Command { - constructor(client, info) { - super(client, info); + constructor(client, info) { + super(client, info); - this.ownerOnly = info.ownerOnly; - this.nsfw = info.nsfw; - this.clientPermissions = info.clientPermissions; - this.userPermissions = info.userPermissions; - this.throttling = info.throttling || { - usages: 1, - duration: 2 - }; - } + this.ownerOnly = info.ownerOnly; + this.nsfw = info.nsfw; + this.clientPermissions = info.clientPermissions; + this.userPermissions = info.userPermissions; + this.throttling = info.throttling || { + usages: 1, + duration: 2 + }; + } - hasPermission(msg) { - if (this.ownerOnly && !this.client.isOwner(msg.author)) { - return 'This Command can only be used by the bot owner.'; - } - if (this.nsfw && !msg.channel.nsfw) { - return 'This Command can only be used in NSFW Channels.'; - } - if (msg.channel.type !== 'dm') { - if (this.clientPermissions) { - for (const permission of this.clientPermissions) { - if (!msg.channel.permissionsFor(this.client.user).has(permission)) { - return `This Command requires the \`${perms[permission]}\` Permission.`; - } - } - } - if (this.userPermissions) { - for (const permission of this.userPermissions) { - if (!msg.channel.permissionsFor(msg.author).has(permission)) { - return `You do not have the \`${perms[permission]}\` Permission.`; - } - } - } - } - return true; - } + hasPermission(msg) { + if (this.ownerOnly && !this.client.isOwner(msg.author)) { + return 'This Command can only be used by the bot owner.'; + } + if (this.nsfw && !msg.channel.nsfw) { + return 'This Command can only be used in NSFW Channels.'; + } + if (msg.channel.type !== 'dm') { + if (this.clientPermissions) { + for (const permission of this.clientPermissions) { + if (!msg.channel.permissionsFor(this.client.user).has(permission)) { + return `This Command requires the \`${perms[permission]}\` Permission.`; + } + } + } + if (this.userPermissions) { + for (const permission of this.userPermissions) { + if (!msg.channel.permissionsFor(msg.author).has(permission)) { + return `You do not have the \`${perms[permission]}\` Permission.`; + } + } + } + } + return true; + } } module.exports = XiaoCommand; diff --git a/structures/Util.js b/structures/Util.js index 4c62f4d7..38021732 100644 --- a/structures/Util.js +++ b/structures/Util.js @@ -2,44 +2,44 @@ const snekfetch = require('snekfetch'); const { carbonKey, dbotsKey, dbotsOrgKey } = require('../config'); class Util { - static cleanXML(str) { - return str - .replace(/(
)/g, '') - .replace(/(')/g, '\'') - .replace(/(—)/g, '—') - .replace(/("|")/g, '"') - .replace(/(&)/g, '&') - .replace(/(\[i\]|\[\/i\])/g, '*'); - } + static cleanXML(str) { + return str + .replace(/(
)/g, '') + .replace(/(')/g, '\'') + .replace(/(—)/g, '—') + .replace(/("|")/g, '"') + .replace(/(&)/g, '&') + .replace(/(\[i\]|\[\/i\])/g, '*'); + } - static dBots(count, id) { - snekfetch - .post(`https://bots.discord.pw/api/bots/${id}/stats`) - .set({ Authorization: dbotsKey }) - .send({ server_count: count }) - .then(() => console.log('[DBOTS] Successfully posted to Discord Bots.')) - .catch((err) => console.error(`[DBOTS] Failed to post to Discord Bots. ${err}`)); - } + static dBots(count, id) { + snekfetch + .post(`https://bots.discord.pw/api/bots/${id}/stats`) + .set({ Authorization: dbotsKey }) + .send({ server_count: count }) + .then(() => console.log('[DBOTS] Successfully posted to Discord Bots.')) + .catch(err => console.error(`[DBOTS] Failed to post to Discord Bots. ${err}`)); + } - static carbon(count) { - snekfetch - .post('https://www.carbonitex.net/discord/data/botdata.php') - .send({ - key: carbonKey, - servercount: count - }) - .then(() => console.log('[CARBON] Successfully posted to Carbon.')) - .catch((err) => console.error(`[CARBON] Failed to post to Carbon. ${err}`)); - } + static carbon(count) { + snekfetch + .post('https://www.carbonitex.net/discord/data/botdata.php') + .send({ + key: carbonKey, + servercount: count + }) + .then(() => console.log('[CARBON] Successfully posted to Carbon.')) + .catch(err => console.error(`[CARBON] Failed to post to Carbon. ${err}`)); + } - static dBotsOrg(count, id) { - snekfetch - .post(`https://discordbots.org/api/bots/${id}/stats`) - .set({ Authorization: dbotsOrgKey }) - .send({ server_count: count }) - .then(() => console.log('[DBOTSORG] Successfully posted to Discord Bots Org.')) - .catch((err) => console.error(`[DBOTSORG] Failed to post to Discord Bots Org. ${err}`)); - } + static dBotsOrg(count, id) { + snekfetch + .post(`https://discordbots.org/api/bots/${id}/stats`) + .set({ Authorization: dbotsOrgKey }) + .send({ server_count: count }) + .then(() => console.log('[DBOTSORG] Successfully posted to Discord Bots Org.')) + .catch(err => console.error(`[DBOTSORG] Failed to post to Discord Bots Org. ${err}`)); + } } module.exports = Util;