diff --git a/XiaoBot.js b/XiaoBot.js index d6b9a40c..62bc919b 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -15,16 +15,16 @@ client.setProvider(new SequelizeProvider(client.database)); client.registry .registerDefaultTypes() .registerGroups([ - ['userinfo', 'User Info'], - ['guildinfo', 'Server Info'], + ['user-info', 'User Info'], + ['guild-info', 'Server Info'], ['moderation', 'Moderation'], ['settings', 'Server Settings'], - ['response', 'Random Response'], - ['randomimg', 'Random Image'], - ['imageedit', 'Image Manipulation'], - ['avataredit', 'Avatar Manipulation'], - ['textedit', 'Text Manipulation'], - ['numedit', 'Number Manipulation'], + ['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'], diff --git a/assets/images/xiao1.png b/assets/images/xiao1.png deleted file mode 100644 index 14f44a9d..00000000 Binary files a/assets/images/xiao1.png and /dev/null differ diff --git a/assets/images/xiao10.png b/assets/images/xiao10.png deleted file mode 100644 index 8727bc38..00000000 Binary files a/assets/images/xiao10.png and /dev/null differ diff --git a/assets/images/xiao2.png b/assets/images/xiao2.png deleted file mode 100644 index 60696ef6..00000000 Binary files a/assets/images/xiao2.png and /dev/null differ diff --git a/assets/images/xiao3.png b/assets/images/xiao3.png deleted file mode 100644 index feac6b66..00000000 Binary files a/assets/images/xiao3.png and /dev/null differ diff --git a/assets/images/xiao4.png b/assets/images/xiao4.png deleted file mode 100644 index 4e2b9797..00000000 Binary files a/assets/images/xiao4.png and /dev/null differ diff --git a/assets/images/xiao5.png b/assets/images/xiao5.png deleted file mode 100644 index 0dae3bba..00000000 Binary files a/assets/images/xiao5.png and /dev/null differ diff --git a/assets/images/xiao6.png b/assets/images/xiao6.png deleted file mode 100644 index b028c2d3..00000000 Binary files a/assets/images/xiao6.png and /dev/null differ diff --git a/assets/images/xiao7.png b/assets/images/xiao7.png deleted file mode 100644 index 1a41e557..00000000 Binary files a/assets/images/xiao7.png and /dev/null differ diff --git a/assets/images/xiao8.png b/assets/images/xiao8.png deleted file mode 100644 index c1262455..00000000 Binary files a/assets/images/xiao8.png and /dev/null differ diff --git a/assets/images/xiao9.png b/assets/images/xiao9.png deleted file mode 100644 index 3302cad5..00000000 Binary files a/assets/images/xiao9.png and /dev/null differ diff --git a/assets/json/easter-egg.json b/assets/json/easter-egg.json index 28e172ba..adb04d61 100644 --- a/assets/json/easter-egg.json +++ b/assets/json/easter-egg.json @@ -43,5 +43,6 @@ "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" + "yuno gasai": "https://cdn.discordapp.com/attachments/256055608279695360/308658394766508033/ff79c3c19cf7e6fdc00c1c26c204c3f6.jpg", + "why": "https://www.youtube.com/watch?v=sluHwh3hJhI" } diff --git a/assets/json/vocaloid.json b/assets/json/vocaloid.json index d6bb9ea1..0c26a3a5 100644 --- a/assets/json/vocaloid.json +++ b/assets/json/vocaloid.json @@ -19,7 +19,6 @@ "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.amazon.com/Gogatsu-Yamai-feat-Kagamine-Len/dp/B00P1BG27S", "https://www.youtube.com/watch?v=N1-Z8uslIsI", "https://www.youtube.com/watch?v=EAgk-t2zzqw", "https://www.youtube.com/watch?v=uLBC2kWYFo8", diff --git a/assets/json/xiao.json b/assets/json/xiao.json new file mode 100644 index 00000000..a36e6e2e --- /dev/null +++ b/assets/json/xiao.json @@ -0,0 +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" +] diff --git a/commands/avataredit/3000-years.js b/commands/avatar-edit/3000-years.js similarity index 88% rename from commands/avataredit/3000-years.js rename to commands/avatar-edit/3000-years.js index f436e356..be7068f4 100644 --- a/commands/avataredit/3000-years.js +++ b/commands/avatar-edit/3000-years.js @@ -9,10 +9,10 @@ module.exports = class YearsCommand extends Command { constructor(client) { super(client, { name: '3000-years', - aliases: ['az'], - group: 'avataredit', + aliases: ['az', '3ky', '3k-years'], + group: 'avatar-edit', memberName: '3000-years', - description: 'It\'s been 3000 years...', + description: 'Draws a user\'s avatar over Pokémon\'s "It\'s been 3000 years" meme.', throttling: { usages: 1, duration: 15 @@ -48,6 +48,6 @@ module.exports = class YearsCommand extends Command { const { body } = await snekfetch.get(avatarURL); avatar.src = body; generate(); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'az.png' }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] }); } }; diff --git a/commands/avataredit/beautiful.js b/commands/avatar-edit/beautiful.js similarity index 90% rename from commands/avataredit/beautiful.js rename to commands/avatar-edit/beautiful.js index 2eb73bd3..2f6f7c38 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avatar-edit/beautiful.js @@ -10,9 +10,9 @@ module.exports = class BeautifulCommand extends Command { super(client, { name: 'beautiful', aliases: ['grunkle-stan'], - group: 'avataredit', + group: 'avatar-edit', memberName: 'beautiful', - description: 'Oh, this? This is beautiful.', + description: 'Draws a user\'s avatar over Gravity Falls\' "Oh, this? This is beautiful." meme.', throttling: { usages: 1, duration: 15 @@ -49,6 +49,6 @@ module.exports = class BeautifulCommand extends Command { const { body } = await snekfetch.get(avatarURL); avatar.src = body; generate(); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'grunkle.png' }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] }); } }; diff --git a/commands/avataredit/bob-ross.js b/commands/avatar-edit/bob-ross.js similarity index 92% rename from commands/avataredit/bob-ross.js rename to commands/avatar-edit/bob-ross.js index e0fe2df1..e420222e 100644 --- a/commands/avataredit/bob-ross.js +++ b/commands/avatar-edit/bob-ross.js @@ -10,9 +10,9 @@ module.exports = class BobRossCommand extends Command { super(client, { name: 'bob-ross', aliases: ['ross'], - group: 'avataredit', + group: 'avatar-edit', memberName: 'bob-ross', - description: 'Make Bob Ross draw an avatar.', + description: 'Draws a user\'s avatar over Bob Ross\' canvas.', throttling: { usages: 1, duration: 15 @@ -52,6 +52,6 @@ module.exports = class BobRossCommand extends Command { const { body } = await snekfetch.get(avatarURL); avatar.src = body; generate(); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'ross.png' }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bob-ross.png' }] }); } }; diff --git a/commands/avataredit/card.js b/commands/avatar-edit/card.js similarity index 94% rename from commands/avataredit/card.js rename to commands/avatar-edit/card.js index 4b51f1b8..42a4a2c2 100644 --- a/commands/avataredit/card.js +++ b/commands/avatar-edit/card.js @@ -12,9 +12,9 @@ module.exports = class CardCommand extends Command { super(client, { name: 'card', aliases: ['discord-card'], - group: 'avataredit', + group: 'avatar-edit', memberName: 'card', - description: 'Creates a Profile Card for the User.', + description: 'Creates a trading card of random rarity based on a user\'s profile.', guildOnly: true, throttling: { usages: 1, @@ -65,7 +65,7 @@ module.exports = class CardCommand extends Command { ctx.fillText(rarity, 73, 411); ctx.fillText(cardID, 60, 457); ctx.fillText(version.split('.')[0], 68, 502); - ctx.font = '14px Open Sans'; + ctx.font = '14px Roboto'; ctx.fillText(member.id, 30, 355); ctx.fillText(`#${member.user.discriminator}`, 313, 355); }; diff --git a/commands/avataredit/challenger.js b/commands/avatar-edit/challenger.js similarity index 92% rename from commands/avataredit/challenger.js rename to commands/avatar-edit/challenger.js index 4709f05e..9cbc895c 100644 --- a/commands/avataredit/challenger.js +++ b/commands/avatar-edit/challenger.js @@ -9,9 +9,9 @@ module.exports = class ChallengerCommand extends Command { constructor(client) { super(client, { name: 'challenger', - group: 'avataredit', + group: 'avatar-edit', memberName: 'challenger', - description: 'A new foe has appeared.', + description: 'Draws a user\'s avatar over Super Smash Bros.\'s "Challenger Approaching" screen.', throttling: { usages: 1, duration: 15 diff --git a/commands/avataredit/dexter.js b/commands/avatar-edit/dexter.js similarity index 93% rename from commands/avataredit/dexter.js rename to commands/avatar-edit/dexter.js index 06b17c81..110a674e 100644 --- a/commands/avataredit/dexter.js +++ b/commands/avatar-edit/dexter.js @@ -9,9 +9,9 @@ module.exports = class DexterCommand extends Command { constructor(client) { super(client, { name: 'dexter', - group: 'avataredit', + group: 'avatar-edit', memberName: 'dexter', - description: 'Who\'s that pokemon?', + description: 'Draws a user\'s avatar over Dexter from Pokémon\'s screen.', throttling: { usages: 1, duration: 15 diff --git a/commands/avataredit/greyscale.js b/commands/avatar-edit/greyscale.js similarity index 94% rename from commands/avataredit/greyscale.js rename to commands/avatar-edit/greyscale.js index 965e903d..0e2e4194 100644 --- a/commands/avataredit/greyscale.js +++ b/commands/avatar-edit/greyscale.js @@ -7,9 +7,9 @@ module.exports = class GreyscaleCommand extends Command { super(client, { name: 'greyscale', aliases: ['grayscale'], - group: 'avataredit', + group: 'avatar-edit', memberName: 'greyscale', - description: 'Greyscale a user\'s avatar colors.', + description: 'Draws a user\'s avatar in greyscale.', throttling: { usages: 1, duration: 15 diff --git a/commands/avataredit/invert.js b/commands/avatar-edit/invert.js similarity index 94% rename from commands/avataredit/invert.js rename to commands/avatar-edit/invert.js index 967e7e2d..75b12b70 100644 --- a/commands/avataredit/invert.js +++ b/commands/avatar-edit/invert.js @@ -6,9 +6,9 @@ module.exports = class InvertCommand extends Command { constructor(client) { super(client, { name: 'invert', - group: 'avataredit', + group: 'avatar-edit', memberName: 'invert', - description: 'Invert a user\'s avatar colors.', + description: 'Draws a user\'s avatar inverted.', throttling: { usages: 1, duration: 15 diff --git a/commands/avataredit/rip.js b/commands/avatar-edit/rip.js similarity index 95% rename from commands/avataredit/rip.js rename to commands/avatar-edit/rip.js index 5bfc09e9..9cc8261f 100644 --- a/commands/avataredit/rip.js +++ b/commands/avatar-edit/rip.js @@ -10,9 +10,9 @@ module.exports = class RIPCommand extends Command { super(client, { name: 'rip', aliases: ['grave', 'grave-stone'], - group: 'avataredit', + group: 'avatar-edit', memberName: 'rip', - description: 'Puts a user\'s avatar over a gravestone.', + description: 'Draws a user\'s avatar over a gravestone.', throttling: { usages: 1, duration: 15 diff --git a/commands/avataredit/simba.js b/commands/avatar-edit/simba.js similarity index 93% rename from commands/avataredit/simba.js rename to commands/avatar-edit/simba.js index a4817371..e05afb24 100644 --- a/commands/avataredit/simba.js +++ b/commands/avatar-edit/simba.js @@ -9,9 +9,9 @@ module.exports = class SimbaCommand extends Command { constructor(client) { super(client, { name: 'simba', - group: 'avataredit', + group: 'avatar-edit', memberName: 'simba', - description: 'Remember who you are...', + description: 'Draws a user\'s avatar over Simba from The Lion King\'s reflection.', throttling: { usages: 1, duration: 15 diff --git a/commands/avataredit/steam-card.js b/commands/avatar-edit/steam-card.js similarity index 93% rename from commands/avataredit/steam-card.js rename to commands/avatar-edit/steam-card.js index 46493cc6..b8a40c2e 100644 --- a/commands/avataredit/steam-card.js +++ b/commands/avatar-edit/steam-card.js @@ -9,9 +9,9 @@ module.exports = class SteamCardCommand extends Command { constructor(client) { super(client, { name: 'steam-card', - group: 'avataredit', + group: 'avatar-edit', memberName: 'steam-card', - description: 'Put an avatar on a Steam Card.', + description: 'Draws a user\'s avatar over a Steam card.', throttling: { usages: 1, duration: 15 @@ -53,6 +53,6 @@ module.exports = class SteamCardCommand extends Command { const { body } = await snekfetch.get(avatarURL); avatar.src = body; generate(); - return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam.png' }] }); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-card.png' }] }); } }; diff --git a/commands/avataredit/triggered.js b/commands/avatar-edit/triggered.js similarity index 94% rename from commands/avataredit/triggered.js rename to commands/avatar-edit/triggered.js index 338cd931..c7893b7b 100644 --- a/commands/avataredit/triggered.js +++ b/commands/avatar-edit/triggered.js @@ -9,9 +9,9 @@ module.exports = class TriggeredCommand extends Command { constructor(client) { super(client, { name: 'triggered', - group: 'avataredit', + group: 'avatar-edit', memberName: 'triggered', - description: 'Put an avatar on a "Triggered" sign.', + description: 'Draws a user\'s avatar over a Triggered meme.', throttling: { usages: 1, duration: 15 diff --git a/commands/avataredit/wanted.js b/commands/avatar-edit/wanted.js similarity index 93% rename from commands/avataredit/wanted.js rename to commands/avatar-edit/wanted.js index ebe74193..0fdbf021 100644 --- a/commands/avataredit/wanted.js +++ b/commands/avatar-edit/wanted.js @@ -9,9 +9,9 @@ module.exports = class WantedCommand extends Command { constructor(client) { super(client, { name: 'wanted', - group: 'avataredit', + group: 'avatar-edit', memberName: 'wanted', - description: 'Puts an avatar on a wanted poster.', + description: 'Draws a user\'s avatar over a wanted poster.', throttling: { usages: 1, duration: 15 diff --git a/commands/games/battle.js b/commands/games/battle.js index 2dba7634..9f0c6d9c 100644 --- a/commands/games/battle.js +++ b/commands/games/battle.js @@ -8,7 +8,7 @@ module.exports = class BattleCommand extends Command { aliases: ['fight', 'death-battle'], group: 'games', memberName: 'battle', - description: 'Choose another user and fight to the death!', + description: 'Engage in a turn-based battle against another user.', guildOnly: true, args: [ { @@ -24,11 +24,11 @@ module.exports = class BattleCommand extends Command { async run(msg, args) { const { opponent } = args; - if (opponent.bot) return msg.say('Bots cannot be fought.'); + 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); - await msg.say(`**${opponent.username}**, do you accept this challenge? **__Y__es** or **No**?`); + 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 @@ -55,10 +55,10 @@ module.exports = class BattleCommand extends Command { else oppoHP = 0; }; while (userHP > 0 && oppoHP > 0) { // eslint-disable-line no-unmodified-loop-condition - const username = userTurn ? msg.author.username : opponent.username; + const user = userTurn ? msg.author : opponent; const id = userTurn ? msg.author.id : opponent.id; await msg.say(stripIndents` - **${username}**, do you **fight**, **guard**, **special**, or **run**? + ${user}, do you **fight**, **guard**, **special**, or **run**? **${msg.author.username}**: ${userHP}HP **${opponent.username}**: ${oppoHP}HP `); @@ -74,37 +74,37 @@ module.exports = class BattleCommand extends Command { const choice = turn.first().content.toLowerCase(); if (choice === 'fight') { const damage = Math.floor(Math.random() * (guard ? 10 : 100)) + 1; - await msg.say(`**${username}** deals **${damage}** damage!`); + await msg.say(`${user} deals **${damage}** damage!`); dealDamage(damage); reset(); } else if (choice === 'guard') { - await msg.say(`**${username}** guards!`); + 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(`**${username}** deals **${damage}** damage!`); + await msg.say(`${user} deals **${damage}** damage!`); dealDamage(damage); reset(); } else { - await msg.say(`**${username}**'s attack missed!`); + await msg.say(`${user}'s attack missed!`); reset(); } } else if (choice === 'run') { - await msg.say(`**${username}** flees!`); + await msg.say(`${user} flees!`); forfeit(); break; } else { - await msg.say('I do not understand what you want to do.'); + 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.username} (${userHP})` : `${opponent.username} (${oppoHP})`} - **Loser:** ${userHP > oppoHP ? `${opponent.username} (${oppoHP})` : `${msg.author.username} (${userHP})`} + **Winner:** ${userHP > oppoHP ? `${msg.author} (${userHP}HP)` : `${opponent} (${oppoHP}HP)`} + **Loser:** ${userHP > oppoHP ? `${opponent} (${oppoHP}HP)` : `${msg.author} (${userHP}HP)`} `); } }; diff --git a/commands/games/lottery.js b/commands/games/lottery.js index 1f9447a5..717af31f 100644 --- a/commands/games/lottery.js +++ b/commands/games/lottery.js @@ -6,13 +6,13 @@ module.exports = class LotteryCommand extends Command { name: 'lottery', group: 'games', memberName: 'lottery', - description: '1 in 100 chance of winning. Winners get... The feeling of winning?' + 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.say(`Wow ${msg.author.username}! You actually won! Great job!`); - else return msg.say(`Nope, sorry ${msg.author.username}, you lost.`); + if (lottery === 1) return msg.reply(`Wow! You actually won! Great job!`); + else return msg.reply(`Nope, sorry, you lost.`); } }; diff --git a/commands/games/math-game.js b/commands/games/math-game.js index 4149e2f9..e0fcd10d 100644 --- a/commands/games/math-game.js +++ b/commands/games/math-game.js @@ -29,9 +29,8 @@ module.exports = class MathGameCommand extends Command { async run(msg, args) { const { difficulty } = args; const operation = operations[Math.floor(Math.random() * operations.length)]; - const maxValue = maxValues[difficulty]; - const value1 = Math.floor(Math.random() * maxValue) + 1; - const value2 = Math.floor(Math.random() * maxValue) + 1; + 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 RichEmbed() diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 191d74f0..9909db2c 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -10,7 +10,7 @@ module.exports = class QuizCommand extends Command { aliases: ['jeopardy'], group: 'games', memberName: 'quiz', - description: 'Answer a quiz question.', + description: 'Answer a true/false quiz question.', clientPermissions: ['EMBED_LINKS'] }); } diff --git a/commands/games/rock-paper-scissors.js b/commands/games/rock-paper-scissors.js index c479dc99..8dbf2959 100644 --- a/commands/games/rock-paper-scissors.js +++ b/commands/games/rock-paper-scissors.js @@ -26,15 +26,15 @@ module.exports = class RockPaperScissorsCommand extends Command { 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 return msg.say('Scissors! Aw... I lose...'); + 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 return msg.say('Scissors! Yes! I win!'); + 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 return msg.say('Scissors! Aw... A tie...'); + 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 6dc73c94..ab9c2bf0 100644 --- a/commands/games/slots.js +++ b/commands/games/slots.js @@ -1,6 +1,6 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); -const slots = [':grapes:', ':tangerine:', ':pear:', ':cherries:']; +const slots = [':grapes:', ':tangerine:', ':pear:', ':cherries:', ':lemon:']; module.exports = class SlotsCommand extends Command { constructor(client) { @@ -8,7 +8,7 @@ module.exports = class SlotsCommand extends Command { name: 'slots', group: 'games', memberName: 'slots', - description: 'Play slots.' + description: 'Play a game of slots.' }); } diff --git a/commands/games/typing-game.js b/commands/games/typing-game.js index 4bea2eaa..533f77e1 100644 --- a/commands/games/typing-game.js +++ b/commands/games/typing-game.js @@ -37,8 +37,7 @@ module.exports = class TypingGameCommand extends Command { max: 1, time }); - if (!msgs.size) return msg.say('Time! Sorry!'); - if (msgs.first().content !== sentence) return msg.say('Nope, sorry!'); + 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!'); } }; diff --git a/commands/guildinfo/emoji.js b/commands/guild-info/emoji.js similarity index 50% rename from commands/guildinfo/emoji.js rename to commands/guild-info/emoji.js index b31342c3..19a09ddc 100644 --- a/commands/guildinfo/emoji.js +++ b/commands/guild-info/emoji.js @@ -4,16 +4,16 @@ module.exports = class EmojiCommand extends Command { constructor(client) { super(client, { name: 'emoji', - group: 'guildinfo', + group: 'guild-info', memberName: 'emoji', - description: 'Gives a list of the server\'s custom emoji.', + description: 'Responds with a list of the server\'s custom emoji.', guildOnly: true }); } run(msg) { - const emojis = msg.guild.emojis; - if (!emojis.size) return msg.say('You have no Custom Emoji.'); - return msg.say(emojis.map((emoji) => emoji).join('')); + 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/guildinfo/server-info.js b/commands/guild-info/server-info.js similarity index 89% rename from commands/guildinfo/server-info.js rename to commands/guild-info/server-info.js index a3f9ae4e..8f955f16 100644 --- a/commands/guildinfo/server-info.js +++ b/commands/guild-info/server-info.js @@ -8,9 +8,9 @@ module.exports = class GuildInfoCommand extends Command { super(client, { name: 'server-info', aliases: ['guild', 'server', 'guild-info'], - group: 'guildinfo', + group: 'guild-info', memberName: 'server-info', - description: 'Gives some info on the server.', + description: 'Responds with detailed information on the server.', guildOnly: true, clientPermissions: ['EMBED_LINKS'] }); @@ -33,7 +33,7 @@ module.exports = class GuildInfoCommand extends Command { .addField('❯ Explicit Filter', filterLevels[msg.guild.explicitContentFilter], true) .addField('❯ Owner', - msg.guild.owner, true) + msg.guild.owner.username, true) .addField('❯ Members', msg.guild.memberCount, true); return msg.embed(embed); diff --git a/commands/imageedit/achievement.js b/commands/image-edit/achievement.js similarity index 92% rename from commands/imageedit/achievement.js rename to commands/image-edit/achievement.js index 06c34174..84bd3819 100644 --- a/commands/imageedit/achievement.js +++ b/commands/image-edit/achievement.js @@ -5,9 +5,9 @@ module.exports = class AchievementCommand extends Command { constructor(client) { super(client, { name: 'achievement', - group: 'imageedit', + group: 'image-edit', memberName: 'achievement', - description: 'Sends a Minecraft Achievement with the text of your choice.', + description: 'Sends a Minecraft achievement with the text of your choice.', clientPermissions: ['ATTACH_FILES'], args: [ { diff --git a/commands/imageedit/meme.js b/commands/image-edit/meme.js similarity index 94% rename from commands/imageedit/meme.js rename to commands/image-edit/meme.js index 2c43db5b..49bf3704 100644 --- a/commands/imageedit/meme.js +++ b/commands/image-edit/meme.js @@ -5,11 +5,11 @@ module.exports = class MemeCommand extends Command { constructor(client) { super(client, { name: 'meme', - group: 'imageedit', + group: 'image-edit', memberName: 'meme', - description: 'Sends a Meme with text of your choice, and a background of your choice.', - details: `**Codes:** ${codes.join(', ')}`, + 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', diff --git a/commands/imageedit/pokemon-fusion.js b/commands/image-edit/pokemon-fusion.js similarity index 91% rename from commands/imageedit/pokemon-fusion.js rename to commands/image-edit/pokemon-fusion.js index d28073f6..6c15a7d2 100644 --- a/commands/imageedit/pokemon-fusion.js +++ b/commands/image-edit/pokemon-fusion.js @@ -6,9 +6,9 @@ module.exports = class PokemonFusionCommand extends Command { super(client, { name: 'pokemon-fusion', aliases: ['poke-fusion', 'poke-fuse'], - group: 'imageedit', + group: 'image-edit', memberName: 'pokemon-fusion', - description: 'Fuses two Generation 1 Pokémon together.', + description: 'Fuses two Generation I Pokémon together.', args: [ { key: 'source1', @@ -16,7 +16,7 @@ module.exports = class PokemonFusionCommand extends Command { type: 'string', validate: (source1) => { if (pokemon[source1.toLowerCase()]) return true; - else return 'Only Pokémon from Generation 1 may be used.'; + else return 'Only Pokémon from Generation I may be used.'; }, parse: (source1) => pokemon[source1.toLowerCase()] }, @@ -26,7 +26,7 @@ module.exports = class PokemonFusionCommand extends Command { type: 'string', validate: (source2) => { if (pokemon[source2.toLowerCase()]) return true; - else return 'Only Pokémon from Generation 1 may be used.'; + else return 'Only Pokémon from Generation I may be used.'; }, parse: (source2) => pokemon[source2.toLowerCase()] } diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index b93fe4f6..23bb7587 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -57,14 +57,7 @@ module.exports = class BanCommand extends Command { 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')) { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Ban - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } else { + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) .setColor(0xFF0000) @@ -75,6 +68,13 @@ module.exports = class BanCommand extends Command { **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 f1f5d86c..aa7acb67 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -54,14 +54,7 @@ module.exports = class KickCommand extends Command { 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')) { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Kick - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } else { + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) .setColor(0xFFA500) @@ -72,6 +65,13 @@ module.exports = class KickCommand extends Command { **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 ac9f43a4..5779e3e5 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -7,7 +7,7 @@ module.exports = class LockdownCommand extends Command { name: 'lockdown', group: 'moderation', memberName: 'lockdown', - description: 'Locks down the current channel or removes a lockdown.', + description: 'Prevents users from posting in the current channel, or removes a lockdown.', guildOnly: true, clientPermissions: ['ADMINISTRATOR'], userPermissions: ['ADMINISTRATOR'], diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index d62785d3..c598085c 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -6,7 +6,7 @@ module.exports = class PruneCommand extends Command { name: 'prune', group: 'moderation', memberName: 'prune', - description: 'Deletes messages from the current channel, up to 99.', + description: 'Deletes up to 99 messages from the current channel.', guildOnly: true, throttling: { usages: 1, diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 77dbc8b4..91bd0e21 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -58,14 +58,7 @@ module.exports = class SoftbanCommand extends Command { 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')) { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Softban - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } else { + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) .setColor(0xFF4500) @@ -76,6 +69,13 @@ module.exports = class SoftbanCommand extends Command { **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 a77876aa..abb1b0a6 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -48,24 +48,24 @@ module.exports = class UnbanCommand extends Command { 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')) { - return modlogs.send(stripIndents` - **Member:** ${member.tag} (${member.id}) - **Action:** Unban - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } else { + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) .setColor(0x00AE86) .setTimestamp() .setDescription(stripIndents` - **Member:** ${member.tag} (${member.id}) + **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 05d1a1c2..e400c640 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -51,14 +51,7 @@ module.exports = class WarnCommand extends Command { 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')) { - return modlogs.send(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Warn - **Reason:** ${reason} - **Moderator:** ${msg.author.tag} - `); - } else { + } else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL()) .setColor(0xFFFF00) @@ -69,6 +62,13 @@ module.exports = class WarnCommand extends Command { **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/numedit/currency.js b/commands/num-edit/currency.js similarity index 95% rename from commands/numedit/currency.js rename to commands/num-edit/currency.js index e22701bb..6eb8439a 100644 --- a/commands/numedit/currency.js +++ b/commands/num-edit/currency.js @@ -6,9 +6,9 @@ module.exports = class CurrencyCommand extends Command { constructor(client) { super(client, { name: 'currency', - group: 'numedit', + group: 'num-edit', memberName: 'currency', - description: 'Converts from one currency to another.', + description: 'Converts a number from one currency to another.', details: `**Codes:** ${codes.join(', ')}`, args: [ { diff --git a/commands/numedit/math.js b/commands/num-edit/math.js similarity index 80% rename from commands/numedit/math.js rename to commands/num-edit/math.js index de641efb..ad5af559 100644 --- a/commands/numedit/math.js +++ b/commands/num-edit/math.js @@ -5,9 +5,9 @@ module.exports = class MathCommand extends Command { constructor(client) { super(client, { name: 'math', - group: 'numedit', + group: 'num-edit', memberName: 'math', - description: 'Does math.', + description: 'Evaluates math expressions.', args: [ { key: 'expression', @@ -22,7 +22,7 @@ module.exports = class MathCommand extends Command { const { expression } = args; try { const solved = math.eval(expression).toString(); - return msg.say(solved); + return msg.say(solved).catch(() => msg.say('Invalid Statement')); } catch (err) { return msg.say('Invalid Statement'); } diff --git a/commands/numedit/temperature.js b/commands/num-edit/temperature.js similarity index 78% rename from commands/numedit/temperature.js rename to commands/num-edit/temperature.js index d8df8516..4b2f73f6 100644 --- a/commands/numedit/temperature.js +++ b/commands/num-edit/temperature.js @@ -4,7 +4,7 @@ module.exports = class TemperatureCommand extends Command { constructor(client) { super(client, { name: 'temperature', - group: 'numedit', + group: 'num-edit', memberName: 'temperature', description: 'Converts temperatures to/from Celsius, Fahrenheit, or Kelvin.', args: [ @@ -39,16 +39,17 @@ module.exports = class TemperatureCommand extends Command { run(msg, args) { const { base, to, amount } = args; - if (base === to) return msg.say(`Converting ${base} to ${to} is the same value, dummy.`); - if (base === 'celsius') { + 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 return msg.say(`${amount}°C is ${amount + 273.15}°K.`); + 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 return msg.say(`${amount}°F is ${(amount + 459.67) * (5 / 9)}°K.`); - } else { + 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 return msg.say(`${amount}°K is ${(amount * 1.8) - 459.67}°F.`); + else if (to === 'fahrenheit') return msg.say(`${amount}°K is ${(amount * 1.8) - 459.67}°F.`); } } }; diff --git a/commands/randomimg/cat.js b/commands/random-img/cat.js similarity index 82% rename from commands/randomimg/cat.js rename to commands/random-img/cat.js index ea9913f4..3e5872f3 100644 --- a/commands/randomimg/cat.js +++ b/commands/random-img/cat.js @@ -6,9 +6,9 @@ module.exports = class CatCommand extends Command { super(client, { name: 'cat', aliases: ['neko'], - group: 'randomimg', + group: 'random-img', memberName: 'cat', - description: 'Sends a random cat image.' + description: 'Responds with a random cat image.' }); } diff --git a/commands/randomimg/dog.js b/commands/random-img/dog.js similarity index 81% rename from commands/randomimg/dog.js rename to commands/random-img/dog.js index 90778fcf..300a5fd6 100644 --- a/commands/randomimg/dog.js +++ b/commands/random-img/dog.js @@ -5,9 +5,9 @@ module.exports = class DogCommand extends Command { constructor(client) { super(client, { name: 'dog', - group: 'randomimg', + group: 'random-img', memberName: 'dog', - description: 'Sends a random dog image.' + description: 'Responds with a random dog image.' }); } diff --git a/commands/randomimg/vocaloid.js b/commands/random-img/vocaloid.js similarity index 81% rename from commands/randomimg/vocaloid.js rename to commands/random-img/vocaloid.js index 037d668a..115c7348 100644 --- a/commands/randomimg/vocaloid.js +++ b/commands/random-img/vocaloid.js @@ -5,9 +5,9 @@ module.exports = class VocaloidCommand extends Command { constructor(client) { super(client, { name: 'vocaloid', - group: 'randomimg', + group: 'random-img', memberName: 'vocaloid', - description: 'Sends a random VOCALOID song.' + description: 'Responds with a random VOCALOID song.' }); } diff --git a/commands/randomimg/xiao.js b/commands/random-img/xiao.js similarity index 53% rename from commands/randomimg/xiao.js rename to commands/random-img/xiao.js index a21124e6..3bf92a06 100644 --- a/commands/randomimg/xiao.js +++ b/commands/random-img/xiao.js @@ -1,20 +1,20 @@ const Command = require('../../structures/Command'); -const path = require('path'); +const xiaos = require('../../assets/json/xiao'); module.exports = class XiaoCommand extends Command { constructor(client) { super(client, { name: 'xiao', aliases: ['xiao-pai'], - group: 'randomimg', + group: 'random-img', memberName: 'xiao', - description: 'Sends a random image of Xiao Pai.', + description: 'Responds with a random image of Xiao Pai.', clientPermissions: ['ATTACH_FILES'] }); } run(msg) { - const xiao = Math.floor(Math.random() * 10) + 1; - return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', `xiao${xiao}.png`)] }); + const xiao = xiaos[Math.floor(Math.random() * xiaos.length)]; + return msg.say({ files: [xiao] }); } }; diff --git a/commands/response/8-ball.js b/commands/random-res/8-ball.js similarity index 88% rename from commands/response/8-ball.js rename to commands/random-res/8-ball.js index a1bd834a..ba94cf37 100644 --- a/commands/response/8-ball.js +++ b/commands/random-res/8-ball.js @@ -6,9 +6,9 @@ module.exports = class MagicBallCommand extends Command { constructor(client) { super(client, { name: '8-ball', - group: 'response', + group: 'random-res', memberName: '8-ball', - description: 'Predicts your future.', + description: 'Asks your question to the Magic 8 Ball.', args: [ { key: 'question', diff --git a/commands/response/choose.js b/commands/random-res/choose.js similarity index 87% rename from commands/response/choose.js rename to commands/random-res/choose.js index 5380a5c1..521c89f8 100644 --- a/commands/response/choose.js +++ b/commands/random-res/choose.js @@ -4,9 +4,9 @@ module.exports = class ChooseCommand extends Command { constructor(client) { super(client, { name: 'choose', - group: 'response', + group: 'random-res', memberName: 'choose', - description: 'Chooses between things.', + description: 'Chooses between options you provide.', args: [ { key: 'choices', diff --git a/commands/response/coin.js b/commands/random-res/coin.js similarity index 93% rename from commands/response/coin.js rename to commands/random-res/coin.js index f53833dc..db1fc04c 100644 --- a/commands/response/coin.js +++ b/commands/random-res/coin.js @@ -6,7 +6,7 @@ module.exports = class CoinFlipCommand extends Command { super(client, { name: 'coin', aliases: ['coin-flip', 'flip'], - group: 'response', + group: 'random-res', memberName: 'coin', description: 'Flips a coin.' }); diff --git a/commands/response/compliment.js b/commands/random-res/compliment.js similarity index 96% rename from commands/response/compliment.js rename to commands/random-res/compliment.js index c1a898b0..46054acb 100644 --- a/commands/response/compliment.js +++ b/commands/random-res/compliment.js @@ -5,7 +5,7 @@ module.exports = class ComplimentCommand extends Command { constructor(client) { super(client, { name: 'compliment', - group: 'response', + group: 'random-res', memberName: 'compliment', description: 'Compliments a user.', args: [ diff --git a/commands/response/fact-core.js b/commands/random-res/fact-core.js similarity index 80% rename from commands/response/fact-core.js rename to commands/random-res/fact-core.js index 33f1769f..cad60bbb 100644 --- a/commands/response/fact-core.js +++ b/commands/random-res/fact-core.js @@ -5,9 +5,9 @@ module.exports = class FactCoreCommand extends Command { constructor(client) { super(client, { name: 'fact-core', - group: 'response', + group: 'random-res', memberName: 'fact-core', - description: 'Says a random Fact Core quote.' + description: 'Responds with a random Fact Core quote.' }); } diff --git a/commands/response/fishy.js b/commands/random-res/fishy.js similarity index 93% rename from commands/response/fishy.js rename to commands/random-res/fishy.js index 5bb8a613..0c45aa4e 100644 --- a/commands/response/fishy.js +++ b/commands/random-res/fishy.js @@ -5,7 +5,7 @@ module.exports = class FishyCommand extends Command { constructor(client) { super(client, { name: 'fishy', - group: 'response', + group: 'random-res', memberName: 'fishy', description: 'Catches a fish.' }); diff --git a/commands/response/fortune.js b/commands/random-res/fortune.js similarity index 66% rename from commands/response/fortune.js rename to commands/random-res/fortune.js index 1444a8af..0db31e52 100644 --- a/commands/response/fortune.js +++ b/commands/random-res/fortune.js @@ -1,13 +1,14 @@ const Command = require('../../structures/Command'); const fortunes = require('../../assets/json/fortune'); -module.exports = class FortuneCookieCommand extends Command { +module.exports = class FortuneCommand extends Command { constructor(client) { super(client, { name: 'fortune', - group: 'response', + aliases: ['fortune-cookie'], + group: 'random-res', memberName: 'fortune', - description: 'Fortune Cookie.' + description: 'Responds with a random fortune.' }); } diff --git a/commands/response/magic-conch.js b/commands/random-res/magic-conch.js similarity index 89% rename from commands/response/magic-conch.js rename to commands/random-res/magic-conch.js index 46b518a2..74a91041 100644 --- a/commands/response/magic-conch.js +++ b/commands/random-res/magic-conch.js @@ -6,9 +6,9 @@ module.exports = class MagicConchCommand extends Command { constructor(client) { super(client, { name: 'magic-conch', - group: 'response', + group: 'random-res', memberName: 'magic-conch', - description: 'Maybe Someday...', + description: 'Asks your question to the Magic Conch.', args: [ { key: 'question', diff --git a/commands/response/name.js b/commands/random-res/name.js similarity index 54% rename from commands/response/name.js rename to commands/random-res/name.js index c597ad11..86e6e201 100644 --- a/commands/response/name.js +++ b/commands/random-res/name.js @@ -5,17 +5,18 @@ module.exports = class RandomNameCommand extends Command { constructor(client) { super(client, { name: 'name', - group: 'response', + group: 'random-res', memberName: 'name', - description: 'Generates a random 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'].includes(gender.toLowerCase())) return true; - else return 'Please enter either `male` or `female`.'; + if (['male', 'female', 'both'].includes(gender.toLowerCase())) return true; + else return 'Please enter either `male`, `female`, or `both`.'; }, parse: (gender) => gender.toLowerCase() } @@ -29,9 +30,19 @@ module.exports = class RandomNameCommand extends Command { if (gender === 'male') { const name = maleNames[Math.floor(Math.random() * maleNames.length)]; return msg.say(`${name} ${lastName}`); - } else { + } 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/response/offspring.js b/commands/random-res/offspring.js similarity index 79% rename from commands/response/offspring.js rename to commands/random-res/offspring.js index d0909b08..4bb349ce 100644 --- a/commands/response/offspring.js +++ b/commands/random-res/offspring.js @@ -5,9 +5,9 @@ module.exports = class OffspringCommand extends Command { constructor(client) { super(client, { name: 'offspring', - group: 'response', + group: 'random-res', memberName: 'offspring', - description: 'Tells you if your new child is a boy or a girl.' + description: 'Decides if your new child will be a boy or a girl.' }); } diff --git a/commands/response/quantum-coin.js b/commands/random-res/quantum-coin.js similarity index 82% rename from commands/response/quantum-coin.js rename to commands/random-res/quantum-coin.js index cb56948e..36d69995 100644 --- a/commands/response/quantum-coin.js +++ b/commands/random-res/quantum-coin.js @@ -6,9 +6,9 @@ module.exports = class QuantumCoinCommand extends Command { super(client, { name: 'quantum-coin', aliases: ['q-coin'], - group: 'response', + group: 'random-res', memberName: 'quantum-coin', - description: 'Flips a coin that lands on nothing.' + description: 'Flips a coin that lands on some form of nothing.' }); } diff --git a/commands/response/rate-waifu.js b/commands/random-res/rate-waifu.js similarity index 89% rename from commands/response/rate-waifu.js rename to commands/random-res/rate-waifu.js index 92798340..d8f05af2 100644 --- a/commands/response/rate-waifu.js +++ b/commands/random-res/rate-waifu.js @@ -5,9 +5,9 @@ module.exports = class RateWaifuCommand extends Command { super(client, { name: 'rate-waifu', aliases: ['waifu'], - group: 'response', + group: 'random-res', memberName: 'rate-waifu', - description: 'Rates your Waifu.', + description: 'Rates your waifu.', args: [ { key: 'waifu', diff --git a/commands/response/roast.js b/commands/random-res/roast.js similarity index 95% rename from commands/response/roast.js rename to commands/random-res/roast.js index 45ed3db6..c4694191 100644 --- a/commands/response/roast.js +++ b/commands/random-res/roast.js @@ -5,7 +5,7 @@ module.exports = class RoastCommand extends Command { constructor(client) { super(client, { name: 'roast', - group: 'response', + group: 'random-res', memberName: 'roast', description: 'Roasts a user.', args: [ diff --git a/commands/response/roll.js b/commands/random-res/roll.js similarity index 86% rename from commands/response/roll.js rename to commands/random-res/roll.js index b7c3ac92..0f1bf173 100644 --- a/commands/response/roll.js +++ b/commands/random-res/roll.js @@ -5,9 +5,9 @@ module.exports = class RollCommand extends Command { super(client, { name: 'roll', aliases: ['dice'], - group: 'response', + group: 'random-res', memberName: 'roll', - description: 'Rolls a dice with a maximum value you specify.', + description: 'Rolls a dice with a maximum value of your choice.', args: [ { key: 'value', diff --git a/commands/response/roulette.js b/commands/random-res/roulette.js similarity index 79% rename from commands/response/roulette.js rename to commands/random-res/roulette.js index 2f5a25b6..fafc8b08 100644 --- a/commands/response/roulette.js +++ b/commands/random-res/roulette.js @@ -4,9 +4,9 @@ module.exports = class RouletteCommand extends Command { constructor(client) { super(client, { name: 'roulette', - group: 'response', + group: 'random-res', memberName: 'roulette', - description: 'Chooses a random member in the server.', + description: 'Chooses a random member of the server.', guildOnly: true }); } diff --git a/commands/response/ship.js b/commands/random-res/ship.js similarity index 77% rename from commands/response/ship.js rename to commands/random-res/ship.js index 1cc8f287..7f3d99ea 100644 --- a/commands/response/ship.js +++ b/commands/random-res/ship.js @@ -5,14 +5,15 @@ module.exports = class ShipCommand extends Command { super(client, { name: 'ship', aliases: ['rate'], - group: 'response', + group: 'random-res', memberName: 'ship', description: 'Ships things/people together.', args: [ { key: 'things', prompt: 'What do you want to ship together?', - type: 'string' + type: 'string', + infinite: true } ] }); @@ -21,6 +22,6 @@ module.exports = class ShipCommand extends Command { run(msg, args) { const { things } = args; const rating = Math.floor(Math.random() * 100) + 1; - return msg.say(`I'd give ${things} a ${rating}%!`); + return msg.say(`I'd give ${things.join(' and ')} a ${rating}%!`); } }; diff --git a/commands/random/cleverbot.js b/commands/random/cleverbot.js index 1637038a..36a5c73a 100644 --- a/commands/random/cleverbot.js +++ b/commands/random/cleverbot.js @@ -9,7 +9,7 @@ module.exports = class CleverbotCommand extends Command { aliases: ['clevs', 'chat'], group: 'random', memberName: 'cleverbot', - description: 'Talk to Cleverbot!', + description: 'Talk to Cleverbot.', args: [ { key: 'text', diff --git a/commands/random/horoscope.js b/commands/random/horoscope.js index 29bce689..419e2e83 100644 --- a/commands/random/horoscope.js +++ b/commands/random/horoscope.js @@ -9,7 +9,7 @@ module.exports = class HoroscopeCommand extends Command { name: 'horoscope', group: 'random', memberName: 'horoscope', - description: 'Gives the horoscope for today for a particular sign.', + description: 'Responds with today\'s horoscope for a particular sign.', details: `**Signs:** ${signs.join(', ')}`, clientPermissions: ['EMBED_LINKS'], args: [ diff --git a/commands/search/lmgtfy.js b/commands/random/lmgtfy.js similarity index 75% rename from commands/search/lmgtfy.js rename to commands/random/lmgtfy.js index e22f2e95..44d738a5 100644 --- a/commands/search/lmgtfy.js +++ b/commands/random/lmgtfy.js @@ -4,13 +4,13 @@ module.exports = class LMGTFYCommand extends Command { constructor(client) { super(client, { name: 'lmgtfy', - group: 'search', + group: 'random', memberName: 'lmgtfy', - description: 'Responds with a LMGTFY link.', + description: 'Creates a LMGTFY link with the query you provide.', args: [ { key: 'query', - prompt: 'What would you like to the link to search for?', + prompt: 'What would you like the link to search for?', type: 'string', parse: (query) => encodeURIComponent(query) } diff --git a/commands/random/nitro.js b/commands/random/nitro.js deleted file mode 100644 index dd685e66..00000000 --- a/commands/random/nitro.js +++ /dev/null @@ -1,28 +0,0 @@ -const Command = require('../../structures/Command'); -const { RichEmbed } = require('discord.js'); -const { stripIndents } = require('common-tags'); - -module.exports = class NitroCommand extends Command { - constructor(client) { - super(client, { - name: 'nitro', - group: 'random', - memberName: 'nitro', - description: 'Sends a "This Message Can Only be viewed by Nitro Members" message.', - clientPermissions: ['EMBED_LINKS'] - }); - } - - run(msg) { - const embed = new RichEmbed() - .setAuthor('Discord Nitro') - .setThumbnail('https://i.imgur.com/wzhMMnl.jpg') - .setColor(0x748BD9) - .setURL('https://discordapp.com/nitro') - .setDescription(stripIndents` - This Message can only be viewed by members with Discord Nitro. - [More Information](https://discordapp.com/nitro) - `); - return msg.embed(embed); - } -}; diff --git a/commands/random/soundboard.js b/commands/random/soundboard.js index 1387df9f..5ac7e779 100644 --- a/commands/random/soundboard.js +++ b/commands/random/soundboard.js @@ -38,16 +38,20 @@ module.exports = class SoundboardCommand extends Command { if (!voiceChannel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK'])) { return msg.say('Missing the `CONNECT` or `SPEAK` Permission for the Voice Channel.'); } - if (!voiceChannel.joinable) return msg.say('This Voice Channel is not joinable.'); - if (this.client.voiceConnections.get(voiceChannel.guild.id)) return msg.say('I am already playing a sound.'); + if (!voiceChannel.joinable) return msg.say('Your Voice Channel is not joinable.'); + if (this.client.voiceConnections.has(voiceChannel.guild.id)) return msg.say('I am already playing a sound.'); const { sound } = args; const connection = await voiceChannel.join(); - msg.react('🔊'); + await msg.react('🔊'); const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', paths[sound])); - dispatcher.on('end', () => { + dispatcher.once('end', () => { voiceChannel.leave(); msg.react('✅'); }); + dispatcher.once('error', () => { + voiceChannel.leave(); + msg.react('⚠'); + }); return null; } }; diff --git a/commands/random/spam.js b/commands/random/spam.js index 7e8a8f5c..5a9599aa 100644 --- a/commands/random/spam.js +++ b/commands/random/spam.js @@ -6,12 +6,12 @@ module.exports = class SpamCommand extends Command { name: 'spam', group: 'random', memberName: 'spam', - description: 'Puts a picture of Spam.', + description: 'Responds with a picture of Spam.', clientPermissions: ['ATTACH_FILES'] }); } run(msg) { - return msg.say('https://i.imgur.com/arx7GJV.jpg'); + return msg.say({ files: ['https://i.imgur.com/arx7GJV.jpg'] }); } }; diff --git a/commands/random/star.js b/commands/random/star.js index a34f34e3..f7222c64 100644 --- a/commands/random/star.js +++ b/commands/random/star.js @@ -9,7 +9,7 @@ module.exports = class StarCommand extends Command { name: 'star', group: 'random', memberName: 'star', - description: 'Stars a message.', + description: 'Stars a message, sending it to the starboard.', args: [ { key: 'id', @@ -25,20 +25,13 @@ module.exports = class StarCommand extends Command { async run(msg, args, reaction) { const { id } = args; const channel = msg.guild.channels.get(msg.guild.settings.get('starboard')); - if (!channel || - !channel.permissionsFor(this.client.user).has('SEND_MESSAGES') || - this.starred.includes(id)) return null; + if (!channel || this.starred.includes(id)) return null; const message = await msg.channel.fetchMessage(id); - if (!reaction && msg.author.id === message.author.id) return msg.reply('You cannot star your own messages, baka.'); // eslint-disable-line max-len + if (!reaction && msg.author.id === message.author.id) return msg.reply('You cannot star your own messages.'); this.starred.push(id); - if (!channel.permissionsFor(this.client.user).has('EMBED_LINKS')) { - return msg.say(stripIndents` - **Author:** ${message.author.tag} - **Content:** ${message.content} - **Date:** ${moment(message.createdTimestamp).format('MMMM Do YYYY h:mm:ss A')} - ${message.attachments.first() ? `**Image:** ${message.attachments.first().url}` : ''} - `); - } else { + if (!channel.permissionsFor(this.client.user).has('SEND_MESSAGES')) { + return msg.say('Could not send the message to the starboard.'); + } else if (channel.permissionsFor(this.client.user).has('EMBED_LINKS')) { const embed = new RichEmbed() .setColor(0xFFFF00) .setAuthor(message.author.tag, message.author.displayAvatarURL) @@ -46,6 +39,13 @@ module.exports = class StarCommand extends Command { .setImage(message.attachments.first() ? message.attachments.first().url : null) .setFooter(moment(message.createdTimestamp).format('MMMM Do YYYY h:mm:ss A')); return channel.send({ embed }); + } else { + return msg.say(stripIndents` + **Author:** ${message.author.tag} + **Content:** ${message.content} + **Date:** ${moment(message.createdTimestamp).format('MMMM Do YYYY h:mm:ss A')} + ${message.attachments.first() ? `**Image:** ${message.attachments.first().url}` : ''} + `); } } }; diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index bcef4fcf..60a44239 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -8,7 +8,7 @@ module.exports = class StrawpollCommand extends Command { name: 'strawpoll', group: 'random', memberName: 'strawpoll', - description: 'Creates a Strawpoll with your options.', + description: 'Creates a Strawpoll from the options you provide.', args: [ { key: 'title', @@ -21,11 +21,11 @@ module.exports = class StrawpollCommand extends Command { }, { key: 'options', - prompt: 'What options do you want me pick from? Maximum of 31.', + prompt: 'What options do you want to be able to pick from? Maximum of 30.', type: 'string', infinite: true, validate: (choice) => { - if (choice.length < 160) return true; + if (choice.length < 140) return true; else return 'Choices must be under 140 characters each.'; } } diff --git a/commands/random/today.js b/commands/random/today.js index 59e2f180..a9fae2e6 100644 --- a/commands/random/today.js +++ b/commands/random/today.js @@ -8,7 +8,7 @@ module.exports = class TodayCommand extends Command { name: 'today', group: 'random', memberName: 'today', - description: 'Tells you what happened today in history.', + description: 'Responds with a random event that occurred today sometime in history.', clientPermissions: ['EMBED_LINKS'] }); } diff --git a/commands/random/would-you-rather.js b/commands/random/would-you-rather.js index 6debd65a..86c8cc25 100644 --- a/commands/random/would-you-rather.js +++ b/commands/random/would-you-rather.js @@ -6,10 +6,10 @@ module.exports = class WouldYouRatherCommand extends Command { constructor(client) { super(client, { name: 'would-you-rather', - aliases: ['wyrather'], + aliases: ['wy-rather'], group: 'random', memberName: 'would-you-rather', - description: 'Gets a random would you rather question.', + description: 'Responds with a random would you rather question.', clientPermissions: ['EMBED_LINKS'] }); } diff --git a/commands/roleplay/high-five.js b/commands/roleplay/high-five.js index 2c6676da..4bbccba9 100644 --- a/commands/roleplay/high-five.js +++ b/commands/roleplay/high-five.js @@ -7,7 +7,7 @@ module.exports = class HighFivesCommand extends Command { name: 'high-five', group: 'roleplay', memberName: 'high-five', - description: 'High Fives something/someone.', + description: 'High Fives a user.', args: [ { key: 'user', @@ -22,7 +22,7 @@ module.exports = class HighFivesCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *high-fives* **${user.username}** - https://i.imgur.com/7BJ6gfM.gif + https://i.imgur.com/BDW5xnu.gif `); } }; diff --git a/commands/search/anime.js b/commands/search/anime.js index bf150762..60057f42 100644 --- a/commands/search/anime.js +++ b/commands/search/anime.js @@ -12,7 +12,7 @@ module.exports = class AnimeCommand extends Command { name: 'anime', group: 'search', memberName: 'anime', - description: 'Searches My Anime List for a specified anime.', + description: 'Searches My Anime List for your query, getting anime results.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/bulbapedia.js b/commands/search/bulbapedia.js index 3e148f1a..035e2c50 100644 --- a/commands/search/bulbapedia.js +++ b/commands/search/bulbapedia.js @@ -9,7 +9,7 @@ module.exports = class BulbapediaCommand extends Command { aliases: ['bulbagarden'], group: 'search', memberName: 'bulbapedia', - description: 'Searches Bulbapedia for something.', + description: 'Searches Bulbapedia for your query.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/danbooru.js b/commands/search/danbooru.js index b4e2d48c..b01f5178 100644 --- a/commands/search/danbooru.js +++ b/commands/search/danbooru.js @@ -8,7 +8,7 @@ module.exports = class DanbooruCommand extends Command { name: 'danbooru', group: 'search', memberName: 'danbooru', - description: 'Sends an image from Danbooru, with optional query.', + description: 'Searches Danbooru with optional query.', nsfw: true, args: [ { diff --git a/commands/search/forecast.js b/commands/search/forecast.js index 3346b50d..4fd3f613 100644 --- a/commands/search/forecast.js +++ b/commands/search/forecast.js @@ -9,7 +9,7 @@ module.exports = class ForecastCommand extends Command { name: 'forecast', group: 'search', memberName: 'forecast', - description: 'Gets the seven-day forecast for a specified location.', + description: 'Responds with the seven-day forecast for a specified location.', clientPermissions: ['EMBED_LINKS'], args: [ { @@ -41,43 +41,43 @@ module.exports = class ForecastCommand extends Command { **High:** ${forecasts[0].high}°F **Low:** ${forecasts[0].low}°F **Condition:** ${forecasts[0].text} - `, true) + `) .addField(`❯ ${forecasts[1].day} - ${forecasts[1].date}`, stripIndents` **High:** ${forecasts[1].high}°F **Low:** ${forecasts[1].low}°F **Condition:** ${forecasts[1].text} - `, true) + `) .addField(`❯ ${forecasts[2].day} - ${forecasts[2].date}`, stripIndents` **High:** ${forecasts[2].high}°F **Low:** ${forecasts[2].low}°F **Condition:** ${forecasts[2].text} - `, true) + `) .addField(`❯ ${forecasts[3].day} - ${forecasts[3].date}`, stripIndents` **High:** ${forecasts[3].high}°F **Low:** ${forecasts[3].low}°F **Condition:** ${forecasts[3].text} - `, true) + `) .addField(`❯ ${forecasts[4].day} - ${forecasts[4].date}`, stripIndents` **High:** ${forecasts[4].high}°F **Low:** ${forecasts[4].low}°F **Condition:** ${forecasts[4].text} - `, true) + `) .addField(`❯ ${forecasts[5].day} - ${forecasts[5].date}`, stripIndents` **High:** ${forecasts[5].high}°F **Low:** ${forecasts[5].low}°F **Condition:** ${forecasts[5].text} - `, true) + `) .addField(`❯ ${forecasts[6].day} - ${forecasts[6].date}`, stripIndents` **High:** ${forecasts[6].high}°F **Low:** ${forecasts[6].low}°F **Condition:** ${forecasts[6].text} - `, true); + `); return msg.embed(embed); } }; diff --git a/commands/search/gelbooru.js b/commands/search/gelbooru.js index 69c6da40..4931a5c4 100644 --- a/commands/search/gelbooru.js +++ b/commands/search/gelbooru.js @@ -10,7 +10,7 @@ module.exports = class GelbooruCommand extends Command { name: 'gelbooru', group: 'search', memberName: 'gelbooru', - description: 'Sends an image from Gelbooru, with query.', + description: 'Searches Gelbooru for your query.', nsfw: true, args: [ { diff --git a/commands/search/giphy.js b/commands/search/giphy.js index 4913193d..dcf5ff26 100644 --- a/commands/search/giphy.js +++ b/commands/search/giphy.js @@ -8,7 +8,7 @@ module.exports = class GiphyCommand extends Command { name: 'giphy', group: 'search', memberName: 'giphy', - description: 'Searches for GIFs with Giphy.', + description: 'Searches Giphy for your query.', args: [ { key: 'query', diff --git a/commands/search/github.js b/commands/search/github.js index b6d62246..6078802f 100644 --- a/commands/search/github.js +++ b/commands/search/github.js @@ -10,7 +10,7 @@ module.exports = class GithubCommand extends Command { name: 'github', group: 'search', memberName: 'github', - description: 'Gets repo information from GitHub.', + description: 'Responds with repo information from a GitHub repository.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/google.js b/commands/search/google.js index 5e1928f9..b991692f 100644 --- a/commands/search/google.js +++ b/commands/search/google.js @@ -9,7 +9,7 @@ module.exports = class GoogleCommand extends Command { name: 'google', group: 'search', memberName: 'google', - description: 'Searches Google.', + description: 'Searches Google for your query.', args: [ { key: 'query', @@ -23,13 +23,17 @@ module.exports = class GoogleCommand extends Command { async run(msg, args) { const { query } = args; const message = await msg.say('Searching...'); - const { text } = await snekfetch - .get('https://www.google.com/search') - .query({ q: query }); - const $ = cheerio.load(text); - let href = $('.r').first().find('a').first().attr('href'); - if (!href) return message.edit('No Results.'); - href = querystring.parse(href.replace('/url?', '')); - return message.edit(href.q); + try { + const { text } = await snekfetch + .get('https://www.google.com/search') + .query({ q: query }); + const $ = cheerio.load(text); + let href = $('.r').first().find('a').first().attr('href'); + if (!href) throw new Error('No Results'); + href = querystring.parse(href.replace('/url?', '')); + return message.edit(href.q); + } catch (err) { + return message.edit(err.message); + } } }; diff --git a/commands/search/konachan.js b/commands/search/konachan.js index 1be986c5..cf308325 100644 --- a/commands/search/konachan.js +++ b/commands/search/konachan.js @@ -8,7 +8,7 @@ module.exports = class KonachanCommand extends Command { name: 'konachan', group: 'search', memberName: 'konachan', - description: 'Sends an image from Konachan, with optional query.', + description: 'Searches Konachan with optional query.', nsfw: true, args: [ { diff --git a/commands/search/manga.js b/commands/search/manga.js index ed1c0f5f..7eef037c 100644 --- a/commands/search/manga.js +++ b/commands/search/manga.js @@ -12,7 +12,7 @@ module.exports = class MangaCommand extends Command { name: 'manga', group: 'search', memberName: 'manga', - description: 'Searches My Anime List for a specified manga.', + description: 'Searches My Anime List for your query, getting manga results.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/map.js b/commands/search/map.js index c24648fb..485d3a5a 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -8,7 +8,7 @@ module.exports = class MapCommand extends Command { name: 'map', group: 'search', memberName: 'map', - description: 'Gets a map image for the location you define with the zoom level you define (1-20).', + description: 'Responds with a map based upon your query.', clientPermissions: ['ATTACH_FILES'], args: [ { diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 2685bfb8..3bdbc976 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -8,7 +8,7 @@ module.exports = class NeopetCommand extends Command { name: 'neopet', group: 'search', memberName: 'neopet', - description: 'Gives a Neopet\'s image, searchable by name.', + description: 'Searches for Neopets with the username of your query.', args: [ { key: 'query', diff --git a/commands/search/osu.js b/commands/search/osu.js index ed4419e9..6a3467d3 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -9,7 +9,7 @@ module.exports = class OsuCommand extends Command { name: 'osu', group: 'search', memberName: 'osu', - description: 'Searches Osu! user data.', + description: 'Searches osu! usernames for your query.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/rule34.js b/commands/search/rule34.js index 010b8eac..ad02eda6 100644 --- a/commands/search/rule34.js +++ b/commands/search/rule34.js @@ -10,7 +10,7 @@ module.exports = class Rule34Command extends Command { name: 'rule34', group: 'search', memberName: 'rule34', - description: 'Sends an image from Rule34, with query.', + description: 'Searches Rule34 for your query.', nsfw: true, args: [ { diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js index 764b25c6..bd7ec28e 100644 --- a/commands/search/soundcloud.js +++ b/commands/search/soundcloud.js @@ -9,7 +9,7 @@ module.exports = class SoundCloudCommand extends Command { name: 'soundcloud', group: 'search', memberName: 'soundcloud', - description: 'Searches SoundCloud for a song.', + description: 'Searches SoundCloud for your query.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/urban.js b/commands/search/urban.js index 46d06cae..4a83b166 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -8,7 +8,7 @@ module.exports = class UrbanCommand extends Command { name: 'urban', group: 'search', memberName: 'urban', - description: 'Searches Urban Dictionary for a word.', + description: 'Searches Urban Dictionary for your query.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 5fcbab67..9135f874 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -10,7 +10,7 @@ module.exports = class WattpadCommand extends Command { name: 'wattpad', group: 'search', memberName: 'wattpad', - description: 'Searches Wattpad for a book.', + description: 'Searches Wattpad for your query.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/weather.js b/commands/search/weather.js index 66849997..9f3989ad 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -8,7 +8,7 @@ module.exports = class WeatherCommand extends Command { name: 'weather', group: 'search', memberName: 'weather', - description: 'Gets weather information for a specified location.', + description: 'Responds with weather information for a specified location.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 8df39d6d..982e4f22 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -8,7 +8,7 @@ module.exports = class WikipediaCommand extends Command { name: 'wikipedia', group: 'search', memberName: 'wikipedia', - description: 'Searches Wikipedia for something.', + description: 'Searches Wikipedia for your query.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/xkcd.js b/commands/search/xkcd.js index 832a5517..def2d2b4 100644 --- a/commands/search/xkcd.js +++ b/commands/search/xkcd.js @@ -9,7 +9,7 @@ module.exports = class XKCDCommand extends Command { aliases: ['kcd'], group: 'search', memberName: 'xkcd', - description: 'Gets an XKCD Comic, optionally opting for today\'s or random.', + description: 'Gets an XKCD Comic, optionally opting for today\'s or a specific number.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/youtube.js b/commands/search/youtube.js index d9b97195..56b19a99 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -9,7 +9,7 @@ module.exports = class YouTubeCommand extends Command { name: 'youtube', group: 'search', memberName: 'youtube', - description: 'Searches YouTube for a video.', + description: 'Searches YouTube for your query.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/search/yu-gi-oh.js b/commands/search/yu-gi-oh.js index 312d7128..190a7654 100644 --- a/commands/search/yu-gi-oh.js +++ b/commands/search/yu-gi-oh.js @@ -8,7 +8,7 @@ module.exports = class YuGiOhCommand extends Command { name: 'yu-gi-oh', group: 'search', memberName: 'yu-gi-oh', - description: 'Gets info on a Yu-Gi-Oh! Card.', + description: 'Responds with info on a Yu-Gi-Oh! card.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/settings/clear-setting.js b/commands/settings/clear-setting.js index 52e56262..42e11f55 100644 --- a/commands/settings/clear-setting.js +++ b/commands/settings/clear-setting.js @@ -17,7 +17,7 @@ module.exports = class ClearSettingCommand extends Command { type: 'string', validate: (setting) => { if (settings.includes(setting)) return true; - else return `Please enter one of the following: ${settings.join(', ')}.`; + else return `Please enter one of the following: ${settings.join(', ')}`; } } ] diff --git a/commands/settings/invite-guard.js b/commands/settings/invite-guard.js index 264ea92d..6d3debef 100644 --- a/commands/settings/invite-guard.js +++ b/commands/settings/invite-guard.js @@ -6,7 +6,7 @@ module.exports = class InviteGuardCommand extends Command { name: 'invite-guard', group: 'settings', memberName: 'invite-guard', - description: 'Configures auto-delete for invites.', + description: 'Turns on auto-deletion of invites.', guildOnly: true, userPermissions: ['ADMINISTRATOR'] }); diff --git a/commands/settings/member-channel.js b/commands/settings/member-channel.js index 5c7192ab..c5728755 100644 --- a/commands/settings/member-channel.js +++ b/commands/settings/member-channel.js @@ -6,7 +6,7 @@ module.exports = class MemberLogCommand extends Command { name: 'member-channel', group: 'settings', memberName: 'member-channel', - description: 'Sets the channel for the member logs to be sent.', + description: 'Sets a channel for member join/leave logs to be sent.', guildOnly: true, userPermissions: ['ADMINISTRATOR'], args: [ diff --git a/commands/settings/mod-channel.js b/commands/settings/mod-channel.js index 30736337..2bc21a8a 100644 --- a/commands/settings/mod-channel.js +++ b/commands/settings/mod-channel.js @@ -6,7 +6,7 @@ module.exports = class ModChannelCommand extends Command { name: 'mod-channel', group: 'settings', memberName: 'mod-channel', - description: 'Sets the channel for the mod logs to be sent.', + description: 'Sets a channel for mod logs to be sent.', guildOnly: true, userPermissions: ['ADMINISTRATOR'], args: [ diff --git a/commands/settings/starboard.js b/commands/settings/starboard.js index 077a7162..778ea31f 100644 --- a/commands/settings/starboard.js +++ b/commands/settings/starboard.js @@ -6,7 +6,7 @@ module.exports = class StarboardCommand extends Command { name: 'starboard', group: 'settings', memberName: 'starboard', - description: 'Sets the channel for the starboard.', + description: 'Sets a channel for the starboard.', guildOnly: true, userPermissions: ['ADMINISTRATOR'], args: [ diff --git a/commands/textedit/binary.js b/commands/text-edit/binary.js similarity index 97% rename from commands/textedit/binary.js rename to commands/text-edit/binary.js index 86a36356..3dcf7afa 100644 --- a/commands/textedit/binary.js +++ b/commands/text-edit/binary.js @@ -4,7 +4,7 @@ module.exports = class BinaryCommand extends Command { constructor(client) { super(client, { name: 'binary', - group: 'textedit', + group: 'text-edit', memberName: 'binary', description: 'Converts text to binary.', args: [ diff --git a/commands/textedit/cow-say.js b/commands/text-edit/cow-say.js similarity index 97% rename from commands/textedit/cow-say.js rename to commands/text-edit/cow-say.js index 6511f64f..1dd2df01 100644 --- a/commands/textedit/cow-say.js +++ b/commands/text-edit/cow-say.js @@ -5,7 +5,7 @@ module.exports = class CowsayCommand extends Command { constructor(client) { super(client, { name: 'cow-say', - group: 'textedit', + group: 'text-edit', memberName: 'cow-say', description: 'Converts text to cowsay.', args: [ diff --git a/commands/textedit/embed.js b/commands/text-edit/embed.js similarity index 96% rename from commands/textedit/embed.js rename to commands/text-edit/embed.js index 9522b58a..8072275a 100644 --- a/commands/textedit/embed.js +++ b/commands/text-edit/embed.js @@ -5,7 +5,7 @@ module.exports = class EmbedCommand extends Command { constructor(client) { super(client, { name: 'embed', - group: 'textedit', + group: 'text-edit', memberName: 'embed', description: 'Sends a message in an embed.', clientPermissions: ['EMBED_LINKS'], diff --git a/commands/textedit/mocking.js b/commands/text-edit/mocking.js similarity index 91% rename from commands/textedit/mocking.js rename to commands/text-edit/mocking.js index 86ccf0fe..6213325d 100644 --- a/commands/textedit/mocking.js +++ b/commands/text-edit/mocking.js @@ -5,9 +5,9 @@ module.exports = class MockingCommand extends Command { super(client, { name: 'mocking', aliases: ['mock'], - group: 'textedit', + group: 'text-edit', memberName: 'mocking', - description: 'I aM a caT, I LIkE To DrInK mILK.', + description: 'SenDs TexT lIkE ThiS.', clientPermissions: ['USE_EXTERNAL_EMOJIS'], args: [ { diff --git a/commands/textedit/morse.js b/commands/text-edit/morse.js similarity index 91% rename from commands/textedit/morse.js rename to commands/text-edit/morse.js index 771547ae..4ffb3380 100644 --- a/commands/textedit/morse.js +++ b/commands/text-edit/morse.js @@ -6,9 +6,9 @@ module.exports = class MorseCommand extends Command { constructor(client) { super(client, { name: 'morse', - group: 'textedit', + group: 'text-edit', memberName: 'morse', - description: 'Translates text to morse code.', + description: 'Converts text to morse code.', args: [ { key: 'text', diff --git a/commands/textedit/pirate.js b/commands/text-edit/pirate.js similarity index 91% rename from commands/textedit/pirate.js rename to commands/text-edit/pirate.js index 95ca7b3e..bdba902a 100644 --- a/commands/textedit/pirate.js +++ b/commands/text-edit/pirate.js @@ -6,9 +6,9 @@ module.exports = class PirateCommand extends Command { constructor(client) { super(client, { name: 'pirate', - group: 'textedit', + group: 'text-edit', memberName: 'pirate', - description: 'Talk like a pirate!', + description: 'Converts text to pirate.', args: [ { key: 'text', diff --git a/commands/textedit/repeat.js b/commands/text-edit/repeat.js similarity index 84% rename from commands/textedit/repeat.js rename to commands/text-edit/repeat.js index 917f49c2..e51905a2 100644 --- a/commands/textedit/repeat.js +++ b/commands/text-edit/repeat.js @@ -4,9 +4,9 @@ module.exports = class RepeatCommand extends Command { constructor(client) { super(client, { name: 'repeat', - group: 'textedit', + group: 'text-edit', memberName: 'repeat', - description: 'Repeat something over and over and over and over (etc).', + description: 'Repeat text over and over and over and over (etc).', args: [ { key: 'text', diff --git a/commands/textedit/reverse.js b/commands/text-edit/reverse.js similarity index 95% rename from commands/textedit/reverse.js rename to commands/text-edit/reverse.js index 3408ebe4..5393c41f 100644 --- a/commands/textedit/reverse.js +++ b/commands/text-edit/reverse.js @@ -4,7 +4,7 @@ module.exports = class ReverseCommand extends Command { constructor(client) { super(client, { name: 'reverse', - group: 'textedit', + group: 'text-edit', memberName: 'reverse', description: 'Reverses text.', args: [ diff --git a/commands/textedit/say.js b/commands/text-edit/say.js similarity index 95% rename from commands/textedit/say.js rename to commands/text-edit/say.js index c5dcdb8d..7c922f97 100644 --- a/commands/textedit/say.js +++ b/commands/text-edit/say.js @@ -5,7 +5,7 @@ module.exports = class SayCommand extends Command { super(client, { name: 'say', aliases: ['copy', 'echo'], - group: 'textedit', + group: 'text-edit', memberName: 'say', description: 'Make XiaoBot say what you wish.', guildOnly: true, diff --git a/commands/textedit/temmie.js b/commands/text-edit/temmie.js similarity index 91% rename from commands/textedit/temmie.js rename to commands/text-edit/temmie.js index c037cd8a..a6560851 100644 --- a/commands/textedit/temmie.js +++ b/commands/text-edit/temmie.js @@ -6,9 +6,9 @@ module.exports = class TemmieCommand extends Command { constructor(client) { super(client, { name: 'temmie', - group: 'textedit', + group: 'text-edit', memberName: 'temmie', - description: 'Translate text to Temmie speak.', + description: 'Converts text to Temmie speak.', args: [ { key: 'text', diff --git a/commands/textedit/translate.js b/commands/text-edit/translate.js similarity index 98% rename from commands/textedit/translate.js rename to commands/text-edit/translate.js index 7ee4ac51..62d797f5 100644 --- a/commands/textedit/translate.js +++ b/commands/text-edit/translate.js @@ -8,7 +8,7 @@ module.exports = class TranslateCommand extends Command { constructor(client) { super(client, { name: 'translate', - group: 'textedit', + 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', diff --git a/commands/textedit/upside-down.js b/commands/text-edit/upside-down.js similarity index 96% rename from commands/textedit/upside-down.js rename to commands/text-edit/upside-down.js index 9b544824..51c017f1 100644 --- a/commands/textedit/upside-down.js +++ b/commands/text-edit/upside-down.js @@ -7,7 +7,7 @@ module.exports = class UpsideDownCommand extends Command { super(client, { name: 'upside-down', aliases: ['udown'], - group: 'textedit', + group: 'text-edit', memberName: 'upside-down', description: 'Flips text upside-down.', args: [ diff --git a/commands/textedit/webhook.js b/commands/text-edit/webhook.js similarity index 96% rename from commands/textedit/webhook.js rename to commands/text-edit/webhook.js index e85e71d7..a36538d6 100644 --- a/commands/textedit/webhook.js +++ b/commands/text-edit/webhook.js @@ -7,7 +7,7 @@ module.exports = class WebhookCommand extends Command { super(client, { name: 'webhook', aliases: ['rin', 'rin-say'], - group: 'textedit', + group: 'text-edit', memberName: 'webhook', description: 'Posts a message to the webhook defined in your `process.env`.', guildOnly: true, diff --git a/commands/textedit/zalgo.js b/commands/text-edit/zalgo.js similarity index 90% rename from commands/textedit/zalgo.js rename to commands/text-edit/zalgo.js index 900e6f06..5e4ad802 100644 --- a/commands/textedit/zalgo.js +++ b/commands/text-edit/zalgo.js @@ -5,9 +5,9 @@ module.exports = class ZalgoCommand extends Command { constructor(client) { super(client, { name: 'zalgo', - group: 'textedit', + group: 'text-edit', memberName: 'zalgo', - description: 'Zalgoizes Text.', + description: 'Converts text to Zalgo.', args: [ { key: 'text', diff --git a/commands/userinfo/avatar.js b/commands/user-info/avatar.js similarity index 86% rename from commands/userinfo/avatar.js rename to commands/user-info/avatar.js index 9126348f..e714f4b1 100644 --- a/commands/userinfo/avatar.js +++ b/commands/user-info/avatar.js @@ -4,9 +4,9 @@ module.exports = class AvatarCommand extends Command { constructor(client) { super(client, { name: 'avatar', - group: 'userinfo', + group: 'user-info', memberName: 'avatar', - description: 'Gives a link to a user\'s avatar.', + description: 'Responds with a link to a user\'s avatar.', args: [ { key: 'user', diff --git a/commands/userinfo/user-info.js b/commands/user-info/user-info.js similarity index 94% rename from commands/userinfo/user-info.js rename to commands/user-info/user-info.js index 742bc4e9..dbbf9d71 100644 --- a/commands/userinfo/user-info.js +++ b/commands/user-info/user-info.js @@ -8,9 +8,9 @@ module.exports = class UserInfoCommand extends Command { super(client, { name: 'user-info', aliases: ['user', 'member', 'member-info'], - group: 'userinfo', + group: 'user-info', memberName: 'user', - description: 'Gives some info on a user.', + description: 'Responds with detailed information on a user.', guildOnly: true, clientPermissions: ['EMBED_LINKS'], args: [ diff --git a/commands/util/info.js b/commands/util/info.js index 1a5d8171..bb259427 100644 --- a/commands/util/info.js +++ b/commands/util/info.js @@ -11,7 +11,7 @@ module.exports = class InfoCommand extends Command { aliases: ['information', 'stats'], group: 'util', memberName: 'info', - description: 'Gives some bot info.', + description: 'Responds with detailed bot information.', guarded: true, clientPermissions: ['EMBED_LINKS'] }); diff --git a/commands/util/invite.js b/commands/util/invite.js index 589334b4..298918a6 100644 --- a/commands/util/invite.js +++ b/commands/util/invite.js @@ -7,7 +7,7 @@ module.exports = class InviteCommand extends Command { name: 'invite', group: 'util', memberName: 'invite', - description: 'Sends you an invite for the bot and an invite to my server.', + description: 'Responds with an invite for the bot and an invite to the home server.', guarded: true }); } diff --git a/commands/util/shard-info.js b/commands/util/shard-info.js index 069ad049..56a579e3 100644 --- a/commands/util/shard-info.js +++ b/commands/util/shard-info.js @@ -10,7 +10,7 @@ module.exports = class ShardInfoCommand extends Command { aliases: ['shard', 'shard-stats'], group: 'util', memberName: 'shard-info', - description: 'Gives some bot info for the Shard you specify.', + description: 'Responds with detailed information for a specific Shard.', guarded: true, clientPermissions: ['EMBED_LINKS'], args: [ diff --git a/commands/util/uptime.js b/commands/util/uptime.js index bbb22aa6..d025d989 100644 --- a/commands/util/uptime.js +++ b/commands/util/uptime.js @@ -8,7 +8,7 @@ module.exports = class UptimeCommand extends Command { name: 'uptime', group: 'util', memberName: 'uptime', - description: 'Displays how long the bot has been active on this shard.', + description: 'Responds with how long the bot has been active on this Shard.', guarded: true }); } diff --git a/package.json b/package.json index 0d2f04cb..dcd56a53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "xiaobot", - "version": "22.3.11", - "description": "A Discord Bot", + "version": "23.0.0", + "description": "Your personal server companion.", "main": "Shard.js", "scripts": { "test": "npm run lint", @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/dragonfire535/xiaobot#readme", "engines": { - "node": "8.1.0" + "node": "8.1.2" }, "dependencies": { "bufferutil": "^3.0.1", diff --git a/structures/CommandoClient.js b/structures/CommandoClient.js index 9245950e..e77e3e97 100644 --- a/structures/CommandoClient.js +++ b/structures/CommandoClient.js @@ -6,7 +6,6 @@ class CommandoClient extends Client { super(options); this.database = Database.db; - Database.start(); } }