From 877f720cfc2d97a8d31e145ba5cd6c0082dbc3de Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 30 Apr 2017 22:56:59 +0000 Subject: [PATCH] msg --- commands/avataredit/3000years.js | 12 ++++++------ commands/avataredit/beautiful.js | 12 ++++++------ commands/avataredit/bobross.js | 12 ++++++------ commands/avataredit/rip.js | 12 ++++++------ commands/avataredit/steamcard.js | 14 +++++++------- commands/avataredit/triggered.js | 12 ++++++------ commands/games/lottery.js | 6 +++--- commands/games/mathgame.js | 18 ++++++++--------- commands/games/quiz.js | 20 +++++++++---------- commands/games/rockpaperscissors.js | 20 +++++++++---------- commands/games/slots.js | 6 +++--- commands/games/typinggame.js | 18 ++++++++--------- commands/guildinfo/emoji.js | 6 +++--- commands/guildinfo/guildinfo.js | 24 +++++++++++------------ commands/imageedit/meme.js | 12 ++++++------ commands/moderation/ban.js | 24 +++++++++++------------ commands/moderation/kick.js | 24 +++++++++++------------ commands/moderation/lockdown.js | 18 ++++++++--------- commands/moderation/prune.js | 16 +++++++-------- commands/moderation/softban.js | 30 ++++++++++++++--------------- commands/moderation/unban.js | 24 +++++++++++------------ commands/moderation/warn.js | 14 +++++++------- commands/random/easteregg.js | 4 ++-- commands/random/giveflower.js | 4 ++-- commands/random/lenny.js | 4 ++-- commands/random/math.js | 8 ++++---- commands/random/nitro.js | 10 +++++----- commands/random/spam.js | 10 +++++----- commands/random/strawpoll.js | 10 +++++----- commands/random/today.js | 12 ++++++------ commands/random/wouldyourather.js | 12 ++++++------ commands/randomimg/cat.js | 12 ++++++------ commands/randomimg/dog.js | 12 ++++++------ commands/randomimg/vocaloid.js | 4 ++-- commands/randomimg/xiaopai.js | 10 +++++----- commands/response/8ball.js | 4 ++-- commands/response/choose.js | 4 ++-- commands/response/coin.js | 4 ++-- commands/response/compliment.js | 4 ++-- commands/response/factcore.js | 4 ++-- commands/response/fishy.js | 4 ++-- commands/response/fortune.js | 4 ++-- commands/response/name.js | 6 +++--- commands/response/offspring.js | 4 ++-- commands/response/quantumcoin.js | 4 ++-- commands/response/ratewaifu.js | 4 ++-- commands/response/roast.js | 4 ++-- commands/response/roll.js | 4 ++-- commands/response/roulette.js | 4 ++-- commands/response/ship.js | 4 ++-- commands/roleplay/cuddle.js | 4 ++-- commands/roleplay/divorce.js | 4 ++-- commands/roleplay/eat.js | 4 ++-- commands/roleplay/falconpunch.js | 4 ++-- commands/roleplay/fistbump.js | 4 ++-- commands/roleplay/highfive.js | 4 ++-- commands/roleplay/hitwithshovel.js | 4 ++-- commands/roleplay/hug.js | 4 ++-- commands/roleplay/inhales.js | 4 ++-- commands/roleplay/kill.js | 4 ++-- commands/roleplay/kiss.js | 4 ++-- commands/roleplay/marries.js | 4 ++-- commands/roleplay/pat.js | 4 ++-- commands/roleplay/poke.js | 4 ++-- commands/roleplay/punch.js | 4 ++-- commands/roleplay/slap.js | 4 ++-- commands/search/botinfo.js | 12 ++++++------ commands/search/define.js | 12 ++++++------ commands/search/discrim.js | 10 +++++----- commands/search/forecast.js | 12 ++++++------ commands/search/google.js | 8 ++++---- commands/search/imdb.js | 12 ++++++------ commands/search/lmgtfy.js | 4 ++-- commands/search/map.js | 12 ++++++------ commands/search/neopet.js | 8 ++++---- commands/search/osu.js | 12 ++++++------ commands/search/soundcloud.js | 12 ++++++------ commands/search/urban.js | 12 ++++++------ commands/search/wattpad.js | 12 ++++++------ commands/search/weather.js | 12 ++++++------ commands/search/wikipedia.js | 14 +++++++------- commands/search/youtube.js | 12 ++++++------ commands/search/yugioh.js | 14 +++++++------- commands/textedit/binary.js | 7 +++---- commands/textedit/cowsay.js | 4 ++-- commands/textedit/embed.js | 12 ++++++------ commands/textedit/morse.js | 4 ++-- commands/textedit/pirate.js | 4 ++-- commands/textedit/reverse.js | 4 ++-- commands/textedit/say.js | 10 +++++----- commands/textedit/temmie.js | 4 ++-- commands/textedit/upsidedown.js | 4 ++-- commands/textedit/webhook.js | 10 +++++----- commands/textedit/zalgo.js | 4 ++-- commands/userinfo/avatar.js | 4 ++-- commands/userinfo/userinfo.js | 12 ++++++------ commands/util/clearsetting.js | 6 +++--- commands/util/info.js | 10 +++++----- commands/util/invite.js | 4 ++-- commands/util/memberchannel.js | 6 +++--- commands/util/modchannel.js | 6 +++--- commands/util/shardinfo.js | 12 ++++++------ commands/util/staffrole.js | 6 +++--- commands/util/uptime.js | 4 ++-- package.json | 2 +- 105 files changed, 460 insertions(+), 461 deletions(-) diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index 77b952ac..4949de1d 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -19,10 +19,10 @@ module.exports = class YearsCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png'); let images = []; @@ -32,8 +32,8 @@ module.exports = class YearsCommand extends Command { avatar.resize(200, 200); az.composite(avatar, 461, 127); az.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return message.say('An Unknown Error Occurred.'); - return message.channel.send({files: [{attachment: buff}]}); + if (err) return msg.say('An Unknown Error Occurred.'); + return msg.channel.send({files: [{attachment: buff}]}); }); } }; diff --git a/commands/avataredit/beautiful.js b/commands/avataredit/beautiful.js index 25f418f9..29c4316f 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avataredit/beautiful.js @@ -19,10 +19,10 @@ module.exports = class BeautifulCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png'); let images = []; @@ -34,8 +34,8 @@ module.exports = class BeautifulCommand extends Command { avatar.resize(190, 190); grunkle.composite(avatar, 451, 434); grunkle.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return message.say('An Unknown Error Occurred.'); - return message.channel.send({files: [{attachment: buff}]}); + if (err) return msg.say('An Unknown Error Occurred.'); + return msg.channel.send({files: [{attachment: buff}]}); }); } }; diff --git a/commands/avataredit/bobross.js b/commands/avataredit/bobross.js index 27da65c7..f01ce286 100644 --- a/commands/avataredit/bobross.js +++ b/commands/avataredit/bobross.js @@ -19,10 +19,10 @@ module.exports = class BobRossCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png'); const blank = new Jimp(600, 775, 0xFFFFFFFF); @@ -35,8 +35,8 @@ module.exports = class BobRossCommand extends Command { blank.composite(avatar, 44, 85); blank.composite(bob, 0, 0); blank.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return message.say('An Unknown Error Occurred.'); - return message.channel.send({files: [{attachment: buff}]}); + if (err) return msg.say('An Unknown Error Occurred.'); + return msg.channel.send({files: [{attachment: buff}]}); }); } }; diff --git a/commands/avataredit/rip.js b/commands/avataredit/rip.js index 682f576b..2bf9cb75 100644 --- a/commands/avataredit/rip.js +++ b/commands/avataredit/rip.js @@ -20,10 +20,10 @@ module.exports = class RIPCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png'); let images = []; @@ -33,8 +33,8 @@ module.exports = class RIPCommand extends Command { avatar.resize(200, 200); grave.composite(avatar, 158, 51); grave.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return message.say('An Unknown Error Occurred.'); - return message.channel.send({files: [{attachment: buff}]}); + if (err) return msg.say('An Unknown Error Occurred.'); + return msg.channel.send({files: [{attachment: buff}]}); }); } }; diff --git a/commands/avataredit/steamcard.js b/commands/avataredit/steamcard.js index c7040530..1ce8415e 100644 --- a/commands/avataredit/steamcard.js +++ b/commands/avataredit/steamcard.js @@ -19,12 +19,12 @@ module.exports = class SteamCardCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { user } = args; - const username = message.guild ? message.guild.member(user).displayName : user.username; + const username = msg.guild ? msg.guild.member(user).displayName : user.username; const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png'); const blank = new Jimp(494, 568, 0xFFFFFFFF); let images = []; @@ -37,8 +37,8 @@ module.exports = class SteamCardCommand extends Command { blank.composite(card, 0, 0); blank.print(font, 38, 20, username); blank.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return message.say('An Unknown Error Occurred.'); - return message.channel.send({files: [{attachment: buff}]}); + if (err) return msg.say('An Unknown Error Occurred.'); + return msg.channel.send({files: [{attachment: buff}]}); }); } }; diff --git a/commands/avataredit/triggered.js b/commands/avataredit/triggered.js index 02600a4c..1242f5a8 100644 --- a/commands/avataredit/triggered.js +++ b/commands/avataredit/triggered.js @@ -16,10 +16,10 @@ module.exports = class TriggeredCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png'); const blank = new Jimp(320, 371, 0xFFFFFFFF); @@ -31,8 +31,8 @@ module.exports = class TriggeredCommand extends Command { blank.composite(avatar, 0, 0); blank.composite(triggered, 0, 0); blank.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return message.say('An Unknown Error Occurred.'); - return message.channel.send({files: [{attachment: buff}]}); + if (err) return msg.say('An Unknown Error Occurred.'); + return msg.channel.send({files: [{attachment: buff}]}); }); } }; diff --git a/commands/games/lottery.js b/commands/games/lottery.js index cd417577..69ac987d 100644 --- a/commands/games/lottery.js +++ b/commands/games/lottery.js @@ -10,10 +10,10 @@ module.exports = class LotteryCommand extends Command { }); } - run(message) { + run(msg) { const lottery = Math.floor(Math.random() * 100) + 1; if (lottery < 99) - return message.say(`Nope, sorry ${message.author.username}, you lost.`); - return message.say(`Wow ${message.author.username}! You actually won! Great job!`); + return msg.say(`Nope, sorry ${msg.author.username}, you lost.`); + return msg.say(`Wow ${msg.author.username}! You actually won! Great job!`); } }; diff --git a/commands/games/mathgame.js b/commands/games/mathgame.js index 10a585b4..5b0ed761 100644 --- a/commands/games/mathgame.js +++ b/commands/games/mathgame.js @@ -24,10 +24,10 @@ module.exports = class MathGameCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { difficulty } = args; const operation = operations[Math.floor(Math.random() * operations.length)]; let value; @@ -55,18 +55,18 @@ module.exports = class MathGameCommand extends Command { const embed = new RichEmbed() .setTitle('You have **10** seconds to answer:') .setDescription(expression); - await message.embed(embed); + await msg.embed(embed); try { - const collected = await message.channel.awaitMessages(response => response.author.id === message.author.id, { + const collected = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, time: 10000, errors: ['time'] }); if (collected.first().content !== solved) - return message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`); - return message.say(`Good Job! You won! ${solved} is the correct answer!`); + return msg.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`); + return msg.say(`Good Job! You won! ${solved} is the correct answer!`); } catch (err) { - return message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`); + return msg.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`); } } }; diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 775b6235..6b2170ed 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -15,10 +15,10 @@ module.exports = class QuizCommand extends Command { }); } - async run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); try { const { body } = await request .get('http://jservice.io/api/random?count=1'); @@ -26,21 +26,21 @@ module.exports = class QuizCommand extends Command { const embed = new RichEmbed() .setTitle('You have **15** seconds to answer this question:') .setDescription(`**Category: ${body[0].category.title}**\n${body[0].question}`); - await message.embed(embed); + await msg.embed(embed); try { - const collected = await message.channel.awaitMessages(res => res.author.id === message.author.id, { + const collected = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, time: 15000, errors: ['time'] }); if (collected.first().content.toLowerCase() !== answer) - return message.say(`The correct answer is: ${answer}`); - return message.say(`Perfect! The correct answer is: ${answer}`); + return msg.say(`The correct answer is: ${answer}`); + return msg.say(`Perfect! The correct answer is: ${answer}`); } catch (err) { - return message.say(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${answer}`); + return msg.say(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${answer}`); } } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/games/rockpaperscissors.js b/commands/games/rockpaperscissors.js index 4b0d5585..eb8a8bf1 100644 --- a/commands/games/rockpaperscissors.js +++ b/commands/games/rockpaperscissors.js @@ -25,30 +25,30 @@ module.exports = class RockPaperScissorsCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { choice } = args; const response = responses[Math.floor(Math.random() * responses.length)]; if (choice === 'rock') { if (response === 'Rock') - return message.say('Rock! Aw, it\'s a tie!'); + return msg.say('Rock! Aw, it\'s a tie!'); if (response === 'Paper') - return message.say('Paper! Yes! I win!'); + return msg.say('Paper! Yes! I win!'); if (response === 'Scissors') - return message.say('Scissors! Aw... I lose...'); + return msg.say('Scissors! Aw... I lose...'); } else if (choice === 'paper') { if (response === 'Rock') - return message.say('Rock! Aw... I lose...'); + return msg.say('Rock! Aw... I lose...'); if (response === 'Paper') - return message.say('Paper! Aw, it\'s a tie!'); + return msg.say('Paper! Aw, it\'s a tie!'); if (response === 'Scissors') - return message.say('Scissors! Yes! I win!'); + return msg.say('Scissors! Yes! I win!'); } else if (choice === 'scissors') { if (response === 'Rock') - return message.say('Rock! Yes! I win!'); + return msg.say('Rock! Yes! I win!'); if (response === 'Paper') - return message.say('Paper! Aw... I lose...'); + return msg.say('Paper! Aw... I lose...'); if (response === 'Scissors') - return message.say('Scissors! Aw, it\'s a tie!'); + return msg.say('Scissors! Aw, it\'s a tie!'); } } }; diff --git a/commands/games/slots.js b/commands/games/slots.js index bf69185f..83f47bd3 100644 --- a/commands/games/slots.js +++ b/commands/games/slots.js @@ -11,12 +11,12 @@ module.exports = class SlotsCommand extends Command { }); } - run(message) { + run(msg) { const slotOne = slotThing[Math.floor(Math.random() * slotThing.length)]; const slotTwo = slotThing[Math.floor(Math.random() * slotThing.length)]; const slotThree = slotThing[Math.floor(Math.random() * slotThing.length)]; if (slotOne === slotTwo && slotOne === slotThree) - return message.say(`${slotOne}|${slotTwo}|${slotThree}\nWow! You won! Great job... er... luck!`); - return message.say(`${slotOne}|${slotTwo}|${slotThree}\nAww... You lost... Guess it's just bad luck, huh?`); + return msg.say(`${slotOne}|${slotTwo}|${slotThree}\nWow! You won! Great job... er... luck!`); + return msg.say(`${slotOne}|${slotTwo}|${slotThree}\nAww... You lost... Guess it's just bad luck, huh?`); } }; diff --git a/commands/games/typinggame.js b/commands/games/typinggame.js index 46a2026c..1b31aa69 100644 --- a/commands/games/typinggame.js +++ b/commands/games/typinggame.js @@ -23,10 +23,10 @@ module.exports = class TypingGameCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { difficulty } = args; const sentence = sentences[Math.floor(Math.random() * sentences.length)]; let time; @@ -50,18 +50,18 @@ module.exports = class TypingGameCommand extends Command { const embed = new RichEmbed() .setTitle(`You have **${time / 1000}** seconds to type:`) .setDescription(sentence); - await message.embed(embed); + await msg.embed(embed); try { - const collected = await message.channel.awaitMessages(response => response.author.id === message.author.id, { + const collected = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, time: time, errors: ['time'] }); if (collected.first().content !== sentence) - return message.say('Nope, your sentence does not match the original. Try again next time!'); - return message.say(`Good Job! You won!`); + return msg.say('Nope, your sentence does not match the original. Try again next time!'); + return msg.say(`Good Job! You won!`); } catch (err) { - return message.say('Aw... Too bad, try again next time!'); + return msg.say('Aw... Too bad, try again next time!'); } } }; diff --git a/commands/guildinfo/emoji.js b/commands/guildinfo/emoji.js index 56400a8e..7e0c8804 100644 --- a/commands/guildinfo/emoji.js +++ b/commands/guildinfo/emoji.js @@ -11,8 +11,8 @@ module.exports = class EmojiCommand extends Command { }); } - run(message) { - return message.say(message.guild.emojis.map(e => e).join('')) - .catch(() => message.say('There was an error sending the emoji. Perhaps you have no custom emoji?')); + run(msg) { + return msg.say(msg.guild.emojis.map(e => e).join('')) + .catch(() => msg.say('There was an error sending the emoji. Perhaps you have no custom emoji?')); } }; diff --git a/commands/guildinfo/guildinfo.js b/commands/guildinfo/guildinfo.js index d64b709b..03a4ac2f 100644 --- a/commands/guildinfo/guildinfo.js +++ b/commands/guildinfo/guildinfo.js @@ -19,26 +19,26 @@ module.exports = class GuildInfoCommand extends Command { }); } - run(message) { - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + run(msg) { + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const embed = new RichEmbed() .setColor(0x00AE86) - .setThumbnail(message.guild.iconURL) + .setThumbnail(msg.guild.iconURL) .addField('**Name:**', - message.guild.name, true) + msg.guild.name, true) .addField('**ID:**', - message.guild.id, true) + msg.guild.id, true) .addField('**Created On:**', - `${message.guild.createdAt}\n${moment.duration(Date.now() - message.guild.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) + `${msg.guild.createdAt}\n${moment.duration(Date.now() - msg.guild.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) .addField('**Default Channel:**', - message.guild.defaultChannel, true) + msg.guild.defaultChannel, true) .addField('**Region:**', - message.guild.region, true) + msg.guild.region, true) .addField('**Owner:**', - message.guild.owner.user.tag, true) + msg.guild.owner.user.tag, true) .addField('**Users:**', - message.guild.memberCount, true); - return message.embed(embed); + msg.guild.memberCount, true); + return msg.embed(embed); } }; diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index 9ddfa199..8e023dfc 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -43,12 +43,12 @@ module.exports = class MemeCommand extends Command { }); } - run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { type, top, bottom } = args; - return message.channel.send({files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`]}) - .catch(() => message.say('An Unknown Error Occurred.')); + return msg.channel.send({files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`]}) + .catch(() => msg.say('An Unknown Error Occurred.')); } }; diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index b88d3e12..9ce6f6d6 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -34,36 +34,36 @@ module.exports = class BanCommand extends Command { return msg.member.permissions.has('BAN_MEMBERS') || msg.member.roles.exists('name', msg.guild.settings.get('staffRole', 'Server Staff')); } - async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('BAN_MEMBERS')) - return message.say('This Command requires the `Ban Members` Permission.'); - const modlogs = message.guild.channels.find('name', message.guild.settings.get('modLog', 'mod_logs')); + async run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('BAN_MEMBERS')) + return msg.say('This Command requires the `Ban Members` Permission.'); + const modlogs = msg.guild.channels.find('name', msg.guild.settings.get('modLog', 'mod_logs')); if (!modlogs) - return message.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); + return msg.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + return msg.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; if (!member.bannable) - return message.say('This member is not bannable. Perhaps they have a higher role than me?'); + return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); try { try { - await member.send(`You were banned from ${message.guild.name}!\nReason: ${reason}.`); + await member.send(`You were banned from ${msg.guild.name}!\nReason: ${reason}.`); } catch (err) { - await message.say('Failed to send DM to user.'); + await msg.say('Failed to send DM to user.'); } await member.ban({ days: 7, reason }); - await message.say(':ok_hand:'); + await msg.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(message.author.tag, message.author.displayAvatarURL) + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFF0000) .setTimestamp() .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`); return modlogs.send({embed}); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index 9c000c47..38a83970 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -31,35 +31,35 @@ module.exports = class KickCommand extends Command { return msg.member.permissions.has('KICK_MEMBERS') || msg.member.roles.exists('name', msg.guild.settings.get('staffRole', 'Server Staff')); } - async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('KICK_MEMBERS')) - return message.say('This Command requires the `Kick Members` Permission.'); - const modlogs = message.guild.channels.find('name', message.guild.settings.get('modLog', 'mod_logs')); + async run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('KICK_MEMBERS')) + return msg.say('This Command requires the `Kick Members` Permission.'); + const modlogs = msg.guild.channels.find('name', msg.guild.settings.get('modLog', 'mod_logs')); if (!modlogs) - return message.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); + return msg.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + return msg.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; if (!member.kickable) - return message.say('This member is not kickable. Perhaps they have a higher role than me?'); + return msg.say('This member is not kickable. Perhaps they have a higher role than me?'); try { try { - await member.send(`You were kicked from ${message.guild.name}!\nReason: ${reason}.`); + await member.send(`You were kicked from ${msg.guild.name}!\nReason: ${reason}.`); } catch (err) { - await message.say('Failed to send DM.'); + await msg.say('Failed to send DM.'); } await member.kick({ reason }); - await message.say(':ok_hand:'); + await msg.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(message.author.tag, message.author.displayAvatarURL) + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFFA500) .setTimestamp() .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`); return modlogs.send({embed}); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/moderation/lockdown.js b/commands/moderation/lockdown.js index 8cf7d079..c2d53e73 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -26,27 +26,27 @@ module.exports = class LockdownCommand extends Command { return msg.member.permissions.has('ADMINISTRATOR'); } - async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('ADMINISTRATOR')) - return message.say('This Command requires the `Administrator` Permission.'); + async run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('ADMINISTRATOR')) + return msg.say('This Command requires the `Administrator` Permission.'); const { type } = args; if (type === 'start') { try { - await message.channel.overwritePermissions(message.guild.defaultRole, { + await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: false }); - return message.say('Lockdown Started, users without Administrator can no longer post messages. Please use `;lockdown stop` to end the lockdown.'); + return msg.say('Lockdown Started, users without Administrator can no longer post messages. Please use `;lockdown stop` to end the lockdown.'); } catch (err) { - return message.say('Something went wrong!'); + return msg.say('Something went wrong!'); } } else if (type === 'stop') { try { - await message.channel.overwritePermissions(message.guild.defaultRole, { + await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: true }); - return message.say('Lockdown Ended, users without Administrator can now post messages.'); + return msg.say('Lockdown Ended, users without Administrator can now post messages.'); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } } diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index 76686922..30686c23 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -29,20 +29,20 @@ module.exports = class PruneCommand extends Command { return msg.member.permissions.has('MANAGE_MESSAGES') || msg.member.roles.exists('name', msg.guild.settings.get('staffRole', 'Server Staff')); } - async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) - return message.say('This Command requires the `Read Message History` Permission.'); - if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) - return message.say('This Command requires the `Manage Messages` Permission.'); + async run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) + return msg.say('This Command requires the `Read Message History` Permission.'); + if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) + return msg.say('This Command requires the `Manage Messages` Permission.'); const { count } = args; try { - const messages = await message.channel.fetchMessages({ + const messages = await msg.channel.fetchMessages({ limit: count + 1 }); - await message.channel.bulkDelete(messages, true); + await msg.channel.bulkDelete(messages, true); return null; } catch (err) { - return message.say('There are no messages younger than two weeks that can be deleted.'); + 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 17062b6e..7a017e6f 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -31,39 +31,39 @@ module.exports = class SoftbanCommand extends Command { return msg.member.permissions.has('KICK_MEMBERS') || msg.member.roles.exists('name', msg.guild.settings.get('staffRole', 'Server Staff')); } - async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('BAN_MEMBERS')) - return message.say('This Command requires the `Ban Members` Permission.'); - if (!message.channel.permissionsFor(this.client.user).has('KICK_MEMBERS')) - return message.say('This Command requires the `Kick Members` Permission.'); - const modlogs = message.guild.channels.find('name', message.guild.settings.get('modLog', 'mod_logs')); + async run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('BAN_MEMBERS')) + return msg.say('This Command requires the `Ban Members` Permission.'); + if (!msg.channel.permissionsFor(this.client.user).has('KICK_MEMBERS')) + return msg.say('This Command requires the `Kick Members` Permission.'); + const modlogs = msg.guild.channels.find('name', msg.guild.settings.get('modLog', 'mod_logs')); if (!modlogs) - return message.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); + return msg.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + return msg.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; if (!member.bannable) - return message.say('This member is not bannable. Perhaps they have a higher role than me?'); + return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); try { try { - await member.send(`You were softbanned from ${message.guild.name}!\nReason: ${reason}.`); + await member.send(`You were softbanned from ${msg.guild.name}!\nReason: ${reason}.`); } catch (err) { - await message.say('Failed to send DM to user.'); + await msg.say('Failed to send DM to user.'); } await member.ban({ days: 7, reason }); - await message.guild.unban(member.user); - await message.say(':ok_hand:'); + await msg.guild.unban(member.user); + await msg.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(message.author.tag, message.author.displayAvatarURL) + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFF4500) .setTimestamp() .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Softban\n**Reason:** ${reason}`); return modlogs.send({embed}); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index c28a02f6..ccd5a5db 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -38,30 +38,30 @@ module.exports = class UnbanCommand extends Command { return msg.member.permissions.has('BAN_MEMBERS') || msg.member.roles.exists('name', msg.guild.settings.get('staffRole', 'Server Staff')); } - async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('BAN_MEMBERS')) - return message.say('This Command requires the `Ban Members` Permission.'); - const modlogs = message.guild.channels.find('name', message.guild.settings.get('modLog', 'mod_logs')); + async run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('BAN_MEMBERS')) + return msg.say('This Command requires the `Ban Members` Permission.'); + const modlogs = msg.guild.channels.find('name', msg.guild.settings.get('modLog', 'mod_logs')); if (!modlogs) - return message.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); + return msg.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + return msg.say('This Command requires the `Embed Links` Permission.'); const { id, reason } = args; - const bans = await message.guild.fetchBans(); + const bans = await msg.guild.fetchBans(); if (!bans.has(id)) - return message.say('This ID is not in the Guild Banlist.'); + return msg.say('This ID is not in the Guild Banlist.'); const member = bans.get(id); try { - await message.guild.unban(member); - await message.say(':ok_hand:'); + await msg.guild.unban(member); + await msg.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(message.author.tag, message.author.displayAvatarURL) + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0x00AE86) .setTimestamp() .setDescription(`**Member:** ${member.tag} (${member.id})\n**Action:** Unban\n**Reason:** ${reason}`); return modlogs.send({embed}); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index 75a2e3f6..07c87cbc 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -30,23 +30,23 @@ module.exports = class WarnCommand extends Command { return msg.member.permissions.has('KICK_MEMBERS') || msg.member.roles.exists('name', msg.guild.settings.get('staffRole', 'Server Staff')); } - async run(message, args) { - const modlogs = message.guild.channels.find('name', message.guild.settings.get('modLog', 'mod_logs')); + async run(msg, args) { + const modlogs = msg.guild.channels.find('name', msg.guild.settings.get('modLog', 'mod_logs')); if (!modlogs) - return message.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); + return msg.say('This Command requires a channel named `mod_logs` or one custom set with the `modchannel` command.'); if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + return msg.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; try { - await message.say(':ok_hand:'); + await msg.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(message.author.tag, message.author.displayAvatarURL) + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFFFF00) .setTimestamp() .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Warn\n**Reason:** ${reason}`); return modlogs.send({embed}); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/random/easteregg.js b/commands/random/easteregg.js index 63eb2498..c1fe8d33 100644 --- a/commands/random/easteregg.js +++ b/commands/random/easteregg.js @@ -25,8 +25,8 @@ module.exports = class EasterEggCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { tag } = args; - return message.say(eastereggs[tag]); + return msg.say(eastereggs[tag]); } }; diff --git a/commands/random/giveflower.js b/commands/random/giveflower.js index b9d0712a..ad7db22e 100644 --- a/commands/random/giveflower.js +++ b/commands/random/giveflower.js @@ -10,7 +10,7 @@ module.exports = class GiveFlowerCommand extends Command { }); } - run(message) { - return message.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/lenny.js b/commands/random/lenny.js index d2882445..e1e98ebc 100644 --- a/commands/random/lenny.js +++ b/commands/random/lenny.js @@ -10,7 +10,7 @@ module.exports = class LennyCommand extends Command { }); } - run(message) { - return message.say('( ͡° ͜ʖ ͡°)'); + run(msg) { + return msg.say('( ͡° ͜ʖ ͡°)'); } }; diff --git a/commands/random/math.js b/commands/random/math.js index 5912e25a..c86599a8 100644 --- a/commands/random/math.js +++ b/commands/random/math.js @@ -16,14 +16,14 @@ module.exports = class MathCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { expression } = args; try { const solved = math.eval(expression); - return message.say(solved) - .catch(() => message.say('Invalid statement.')); + return msg.say(solved) + .catch(() => msg.say('Invalid statement.')); } catch (err) { - return message.say('Invalid statement.'); + return msg.say('Invalid statement.'); } } }; diff --git a/commands/random/nitro.js b/commands/random/nitro.js index 0fb17cc5..daaf2d00 100644 --- a/commands/random/nitro.js +++ b/commands/random/nitro.js @@ -11,16 +11,16 @@ module.exports = class NitroCommand extends Command { }); } - run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const embed = new RichEmbed() .setAuthor('Discord Nitro') .setThumbnail('https://pbs.twimg.com/profile_images/814184180649197568/y2eZcVMq.jpg') .setColor(0x748BD9) .setURL('https://discordapp.com/nitro') .setDescription('This Message can only be viewed by members with Discord Nitro.\n[More Information](https://discordapp.com/nitro)'); - return message.embed(embed); + return msg.embed(embed); } }; diff --git a/commands/random/spam.js b/commands/random/spam.js index 8d4b549f..2ea149ce 100644 --- a/commands/random/spam.js +++ b/commands/random/spam.js @@ -10,10 +10,10 @@ module.exports = class SpamCommand extends Command { }); } - run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); - return message.channel.send({files: ['https://i.imgur.com/2JFu5xE.jpg']}); + run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); + return msg.channel.send({files: ['https://i.imgur.com/2JFu5xE.jpg']}); } }; diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index daf973f0..55ea7224 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -31,12 +31,12 @@ module.exports = class StrawpollCommand extends Command { }); } - async run(message, args) { + async run(msg, args) { const { title, choices } = args; if (choices.length < 2) - return message.say('You provided less than two choices.'); + return msg.say('You provided less than two choices.'); if (choices.length > 31) - return message.say('You provided more than thirty choices.'); + return msg.say('You provided more than thirty choices.'); try { const { body } = await request .post('https://strawpoll.me/api/v2/polls') @@ -44,10 +44,10 @@ module.exports = class StrawpollCommand extends Command { title: title, options: choices }); - return message.say(`${body.title}\nhttp://strawpoll.me/${body.id}`); + return msg.say(`${body.title}\nhttp://strawpoll.me/${body.id}`); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/random/today.js b/commands/random/today.js index cd7b1ce8..ba8365e5 100644 --- a/commands/random/today.js +++ b/commands/random/today.js @@ -12,10 +12,10 @@ module.exports = class TodayCommand extends Command { }); } - async run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); try { const { text } = await request .get('http://history.muffinlabs.com/date') @@ -29,9 +29,9 @@ module.exports = class TodayCommand extends Command { .setTitle(`On this day (${parsed.date})...`) .setTimestamp() .setDescription(`${events[random].year}: ${events[random].text}`); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/random/wouldyourather.js b/commands/random/wouldyourather.js index dcfb5fcd..cd382375 100644 --- a/commands/random/wouldyourather.js +++ b/commands/random/wouldyourather.js @@ -15,10 +15,10 @@ module.exports = class WouldYouRatherCommand extends Command { }); } - async run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); try { const { body } = await request .get('http://www.rrrather.com/botapi'); @@ -27,9 +27,9 @@ module.exports = class WouldYouRatherCommand extends Command { .setURL(body.link) .setColor(0x9797FF) .setDescription(`${body.choicea} OR ${body.choiceb}?`); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/randomimg/cat.js b/commands/randomimg/cat.js index 79208e48..763108d9 100644 --- a/commands/randomimg/cat.js +++ b/commands/randomimg/cat.js @@ -14,16 +14,16 @@ module.exports = class CatCommand extends Command { }); } - async run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); try { const { body } = await request .get('http://random.cat/meow'); - return message.channel.send({files: [body.file]}); + return msg.channel.send({files: [body.file]}); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/randomimg/dog.js b/commands/randomimg/dog.js index 5843108e..a4932ac2 100644 --- a/commands/randomimg/dog.js +++ b/commands/randomimg/dog.js @@ -11,16 +11,16 @@ module.exports = class DogCommand extends Command { }); } - async run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); try { const { body } = await request .get('https://random.dog/woof.json'); - return message.channel.send({files: [body.url]}); + return msg.channel.send({files: [body.url]}); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/randomimg/vocaloid.js b/commands/randomimg/vocaloid.js index 9de9fe4a..3d90f6f3 100644 --- a/commands/randomimg/vocaloid.js +++ b/commands/randomimg/vocaloid.js @@ -11,8 +11,8 @@ module.exports = class VocaloidCommand extends Command { }); } - run(message) { + run(msg) { const song = songs[Math.floor(Math.random() * songs.length)]; - return message.say(song); + return msg.say(song); } }; diff --git a/commands/randomimg/xiaopai.js b/commands/randomimg/xiaopai.js index bb600c55..be682cac 100644 --- a/commands/randomimg/xiaopai.js +++ b/commands/randomimg/xiaopai.js @@ -14,11 +14,11 @@ module.exports = class XiaoCommand extends Command { }); } - run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const xiao = xiaos[Math.floor(Math.random() * xiaos.length)]; - return message.channel.send({files: [xiao]}); + return msg.channel.send({files: [xiao]}); } }; diff --git a/commands/response/8ball.js b/commands/response/8ball.js index 2294661a..01277a20 100644 --- a/commands/response/8ball.js +++ b/commands/response/8ball.js @@ -16,9 +16,9 @@ module.exports = class MagicBallCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { question } = args; const answer = answers[Math.floor(Math.random() * answers.length)]; - return message.say(`Question: ${question}\n:8ball: ${answer} :8ball:`); + return msg.say(`Question: ${question}\n:8ball: ${answer} :8ball:`); } }; diff --git a/commands/response/choose.js b/commands/response/choose.js index 9a09bad5..fa510b78 100644 --- a/commands/response/choose.js +++ b/commands/response/choose.js @@ -16,9 +16,9 @@ module.exports = class ChooseCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { choices } = args; const choice = choices[Math.floor(Math.random() * choices.length)]; - return message.say(`I choose ${choice}!`); + return msg.say(`I choose ${choice}!`); } }; diff --git a/commands/response/coin.js b/commands/response/coin.js index 2e60a2a8..27ec3224 100644 --- a/commands/response/coin.js +++ b/commands/response/coin.js @@ -15,8 +15,8 @@ module.exports = class CoinFlipCommand extends Command { }); } - run(message) { + run(msg) { const side = sides[Math.floor(Math.random() * sides.length)]; - return message.say(`It landed on ${side}!`); + return msg.say(`It landed on ${side}!`); } }; diff --git a/commands/response/compliment.js b/commands/response/compliment.js index b96e4f8a..557919bc 100644 --- a/commands/response/compliment.js +++ b/commands/response/compliment.js @@ -16,9 +16,9 @@ module.exports = class ComplimentCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; const compliment = compliments[Math.floor(Math.random() * compliments.length)]; - return message.say(`${thing}, ${compliment}`); + return msg.say(`${thing}, ${compliment}`); } }; diff --git a/commands/response/factcore.js b/commands/response/factcore.js index 05bd957b..08b4df91 100644 --- a/commands/response/factcore.js +++ b/commands/response/factcore.js @@ -11,8 +11,8 @@ module.exports = class FactCoreCommand extends Command { }); } - run(message) { + run(msg) { const fact = facts[Math.floor(Math.random() * facts.length)]; - return message.say(fact); + return msg.say(fact); } }; diff --git a/commands/response/fishy.js b/commands/response/fishy.js index 8bfa806b..5daece7e 100644 --- a/commands/response/fishy.js +++ b/commands/response/fishy.js @@ -11,8 +11,8 @@ module.exports = class FishyCommand extends Command { }); } - run(message) { + run(msg) { const fish = fishes[Math.floor(Math.random() * fishes.length)]; - return message.say(`You caught a: ${fish}`); + return msg.say(`You caught a: ${fish}`); } }; diff --git a/commands/response/fortune.js b/commands/response/fortune.js index 01da63fa..404da20d 100644 --- a/commands/response/fortune.js +++ b/commands/response/fortune.js @@ -11,8 +11,8 @@ module.exports = class FortuneCookieCommand extends Command { }); } - run(message) { + run(msg) { const fortune = fortunes[Math.floor(Math.random() * fortunes.length)]; - return message.say(fortune); + return msg.say(fortune); } }; diff --git a/commands/response/name.js b/commands/response/name.js index db79065f..23197eb1 100644 --- a/commands/response/name.js +++ b/commands/response/name.js @@ -22,15 +22,15 @@ module.exports = class RandomNameCommand extends Command { }); } - run(message, args) { + run(msg, args) { 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 message.say(`${name} ${lastName}`); + return msg.say(`${name} ${lastName}`); } else if (gender === 'female') { const name = femaleNames[Math.floor(Math.random() * femaleNames.length)]; - return message.say(`${name} ${lastName}`); + return msg.say(`${name} ${lastName}`); } } }; diff --git a/commands/response/offspring.js b/commands/response/offspring.js index 75e43bd1..52fc9165 100644 --- a/commands/response/offspring.js +++ b/commands/response/offspring.js @@ -11,8 +11,8 @@ module.exports = class OffspringCommand extends Command { }); } - run(message) { + run(msg) { const gender = genders[Math.floor(Math.random() * genders.length)]; - return message.say(`It's a ${gender}!`); + return msg.say(`It's a ${gender}!`); } }; diff --git a/commands/response/quantumcoin.js b/commands/response/quantumcoin.js index aedad07f..aff1650b 100644 --- a/commands/response/quantumcoin.js +++ b/commands/response/quantumcoin.js @@ -14,8 +14,8 @@ module.exports = class QuantumCoinCommand extends Command { }); } - run(message) { + run(msg) { const side = sides[Math.floor(Math.random() * sides.length)]; - return message.say(`It landed ${side}.`); + return msg.say(`It landed ${side}.`); } }; diff --git a/commands/response/ratewaifu.js b/commands/response/ratewaifu.js index c4b5f8a5..b92af5c4 100644 --- a/commands/response/ratewaifu.js +++ b/commands/response/ratewaifu.js @@ -18,9 +18,9 @@ module.exports = class RateWaifuCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { waifu } = args; const rating = Math.floor(Math.random() * 10) + 1; - return message.say(`I'd give ${waifu} a ${rating}/10!`); + return msg.say(`I'd give ${waifu} a ${rating}/10!`); } }; diff --git a/commands/response/roast.js b/commands/response/roast.js index 97ba0d0a..3fdfacdc 100644 --- a/commands/response/roast.js +++ b/commands/response/roast.js @@ -16,9 +16,9 @@ module.exports = class RoastCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; const roast = roasts[Math.floor(Math.random() * roasts.length)]; - return message.say(`${thing}, ${roast}`); + return msg.say(`${thing}, ${roast}`); } }; diff --git a/commands/response/roll.js b/commands/response/roll.js index c53fbcb3..7cc4fdf6 100644 --- a/commands/response/roll.js +++ b/commands/response/roll.js @@ -18,9 +18,9 @@ module.exports = class RollCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { value } = args; const roll = Math.floor(Math.random() * value) + 1; - return message.say(`You rolled a ${roll}.`); + return msg.say(`You rolled a ${roll}.`); } }; diff --git a/commands/response/roulette.js b/commands/response/roulette.js index b4dd3eef..045c7431 100644 --- a/commands/response/roulette.js +++ b/commands/response/roulette.js @@ -11,7 +11,7 @@ module.exports = class RouletteCommand extends Command { }); } - run(message) { - return message.say(`I choose ${message.guild.members.random().displayName}!`); + run(msg) { + return msg.say(`I choose ${msg.guild.members.random().displayName}!`); } }; diff --git a/commands/response/ship.js b/commands/response/ship.js index f52586af..85f50ad3 100644 --- a/commands/response/ship.js +++ b/commands/response/ship.js @@ -18,9 +18,9 @@ module.exports = class ShipCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { things } = args; const rating = Math.floor(Math.random() * 100) + 1; - return message.say(`I'd give ${things} a ${rating}%!`); + return msg.say(`I'd give ${things} a ${rating}%!`); } }; diff --git a/commands/roleplay/cuddle.js b/commands/roleplay/cuddle.js index 02332114..70024ea6 100644 --- a/commands/roleplay/cuddle.js +++ b/commands/roleplay/cuddle.js @@ -15,8 +15,8 @@ module.exports = class CuddleCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *cuddles* ${thing}`); + return msg.say(`${msg.author} *cuddles* ${thing}`); } }; diff --git a/commands/roleplay/divorce.js b/commands/roleplay/divorce.js index e6cdf248..44714ce3 100644 --- a/commands/roleplay/divorce.js +++ b/commands/roleplay/divorce.js @@ -15,8 +15,8 @@ module.exports = class DivorceCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *divorces* ${thing}`); + return msg.say(`${msg.author} *divorces* ${thing}`); } }; diff --git a/commands/roleplay/eat.js b/commands/roleplay/eat.js index b7069347..130f8f07 100644 --- a/commands/roleplay/eat.js +++ b/commands/roleplay/eat.js @@ -15,8 +15,8 @@ module.exports = class EatCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *eats* ${thing}`); + return msg.say(`${msg.author} *eats* ${thing}`); } }; diff --git a/commands/roleplay/falconpunch.js b/commands/roleplay/falconpunch.js index f8f316c2..6760dcd9 100644 --- a/commands/roleplay/falconpunch.js +++ b/commands/roleplay/falconpunch.js @@ -15,8 +15,8 @@ module.exports = class FalconPunchCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *falcon punches* ${thing}`); + return msg.say(`${msg.author} *falcon punches* ${thing}`); } }; diff --git a/commands/roleplay/fistbump.js b/commands/roleplay/fistbump.js index 706286ac..1abfc38e 100644 --- a/commands/roleplay/fistbump.js +++ b/commands/roleplay/fistbump.js @@ -15,8 +15,8 @@ module.exports = class FistBumpCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *fist-bumps* ${thing} *badalalala*`); + return msg.say(`${msg.author} *fist-bumps* ${thing} *badalalala*`); } }; diff --git a/commands/roleplay/highfive.js b/commands/roleplay/highfive.js index 9f5003e7..eca904b6 100644 --- a/commands/roleplay/highfive.js +++ b/commands/roleplay/highfive.js @@ -15,8 +15,8 @@ module.exports = class HighFivesCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *high-fives* ${thing}`); + return msg.say(`${msg.author} *high-fives* ${thing}`); } }; diff --git a/commands/roleplay/hitwithshovel.js b/commands/roleplay/hitwithshovel.js index 0cb9be1f..dedf180c 100644 --- a/commands/roleplay/hitwithshovel.js +++ b/commands/roleplay/hitwithshovel.js @@ -15,8 +15,8 @@ module.exports = class HitwithShovelCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *hits* ${thing} *with a shovel*`); + return msg.say(`${msg.author} *hits* ${thing} *with a shovel*`); } }; diff --git a/commands/roleplay/hug.js b/commands/roleplay/hug.js index 79748bc4..b62bdd6d 100644 --- a/commands/roleplay/hug.js +++ b/commands/roleplay/hug.js @@ -15,8 +15,8 @@ module.exports = class HugCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *hugs* ${thing}`); + return msg.say(`${msg.author} *hugs* ${thing}`); } }; diff --git a/commands/roleplay/inhales.js b/commands/roleplay/inhales.js index 2aac39d5..ebdd0459 100644 --- a/commands/roleplay/inhales.js +++ b/commands/roleplay/inhales.js @@ -15,8 +15,8 @@ module.exports = class InhaleCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *inhales* ${thing} *but gained no ability...*`); + return msg.say(`${msg.author} *inhales* ${thing} *but gained no ability...*`); } }; diff --git a/commands/roleplay/kill.js b/commands/roleplay/kill.js index a72db6ef..4b6b69ac 100644 --- a/commands/roleplay/kill.js +++ b/commands/roleplay/kill.js @@ -15,8 +15,8 @@ module.exports = class KillCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *kills* ${thing}`); + return msg.say(`${msg.author} *kills* ${thing}`); } }; diff --git a/commands/roleplay/kiss.js b/commands/roleplay/kiss.js index 27055e84..008213ab 100644 --- a/commands/roleplay/kiss.js +++ b/commands/roleplay/kiss.js @@ -15,8 +15,8 @@ module.exports = class KissCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *kisses* ${thing}`); + return msg.say(`${msg.author} *kisses* ${thing}`); } }; diff --git a/commands/roleplay/marries.js b/commands/roleplay/marries.js index 09886562..b5f8caf0 100644 --- a/commands/roleplay/marries.js +++ b/commands/roleplay/marries.js @@ -15,8 +15,8 @@ module.exports = class MarryCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *marries* ${thing}`); + return msg.say(`${msg.author} *marries* ${thing}`); } }; diff --git a/commands/roleplay/pat.js b/commands/roleplay/pat.js index 9ed244cb..53cffd5c 100644 --- a/commands/roleplay/pat.js +++ b/commands/roleplay/pat.js @@ -15,8 +15,8 @@ module.exports = class PatCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *pats* ${thing}`); + return msg.say(`${msg.author} *pats* ${thing}`); } }; diff --git a/commands/roleplay/poke.js b/commands/roleplay/poke.js index 8c30ff34..edcf68be 100644 --- a/commands/roleplay/poke.js +++ b/commands/roleplay/poke.js @@ -15,8 +15,8 @@ module.exports = class PokeCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *pokes* ${thing}`); + return msg.say(`${msg.author} *pokes* ${thing}`); } }; diff --git a/commands/roleplay/punch.js b/commands/roleplay/punch.js index e1330eec..b49fe271 100644 --- a/commands/roleplay/punch.js +++ b/commands/roleplay/punch.js @@ -15,8 +15,8 @@ module.exports = class PunchCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *punches* ${thing}`); + return msg.say(`${msg.author} *punches* ${thing}`); } }; diff --git a/commands/roleplay/slap.js b/commands/roleplay/slap.js index 3191bb3d..391eef1c 100644 --- a/commands/roleplay/slap.js +++ b/commands/roleplay/slap.js @@ -15,8 +15,8 @@ module.exports = class SlapCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { thing } = args; - return message.say(`${message.author} *slaps* ${thing}`); + return msg.say(`${msg.author} *slaps* ${thing}`); } }; diff --git a/commands/search/botinfo.js b/commands/search/botinfo.js index 57759d9a..2e3cce77 100644 --- a/commands/search/botinfo.js +++ b/commands/search/botinfo.js @@ -17,10 +17,10 @@ module.exports = class BotSearchCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { bot } = args; try { const { body } = await request @@ -40,9 +40,9 @@ module.exports = class BotSearchCommand extends Command { `[Here](${body.invite_url})`, true) .addField('**Prefix:**', body.prefix, true); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The bot may not have been found.'); + return msg.say('An Error Occurred. The bot may not have been found.'); } } }; diff --git a/commands/search/define.js b/commands/search/define.js index d83caf2c..cb299b15 100644 --- a/commands/search/define.js +++ b/commands/search/define.js @@ -18,10 +18,10 @@ module.exports = class DefineCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -30,9 +30,9 @@ module.exports = class DefineCommand extends Command { .setColor(0x9797FF) .setTitle(body[0].word) .setDescription(body[0].text); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The word may not have been found.'); + return msg.say('An Error Occurred. The word may not have been found.'); } } }; diff --git a/commands/search/discrim.js b/commands/search/discrim.js index ac9e7420..8ce1a06e 100644 --- a/commands/search/discrim.js +++ b/commands/search/discrim.js @@ -25,15 +25,15 @@ module.exports = class DiscrimCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { discrim } = args; const users = await this.client.users.filter(u => u.discriminator === discrim).map(u => u.username).sort(); const embed = new RichEmbed() .setTitle(`${users.length} Users with the discriminator: ${discrim}`) .setDescription(users.join(', ')); - return message.embed(embed); + return msg.embed(embed); } }; diff --git a/commands/search/forecast.js b/commands/search/forecast.js index 91a79326..584d6bc6 100644 --- a/commands/search/forecast.js +++ b/commands/search/forecast.js @@ -17,10 +17,10 @@ module.exports = class ForecastCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -45,9 +45,9 @@ module.exports = class ForecastCommand extends Command { `**High:** ${forecasts[5].high}°F, **Low:** ${forecasts[5].low}°F, **Condition:** ${forecasts[5].text}`) .addField(`**${forecasts[6].day} - ${forecasts[6].date}:**`, `**High:** ${forecasts[6].high}°F, **Low:** ${forecasts[6].low}°F, **Condition:** ${forecasts[6].text}`); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The location may not have been found.'); + return msg.say('An Error Occurred. The location may not have been found.'); } } }; diff --git a/commands/search/google.js b/commands/search/google.js index 8d45aa29..fe5d862d 100644 --- a/commands/search/google.js +++ b/commands/search/google.js @@ -19,9 +19,9 @@ module.exports = class GoogleCommand extends Command { }); } - async run(message, args) { + async run(msg, args) { const { query } = args; - const msg = await message.say('Searching...'); + const message = await msg.say('Searching...'); try { const { text } = await request .get(`https://www.google.com/search?q=${query}`); @@ -29,9 +29,9 @@ module.exports = class GoogleCommand extends Command { let href = $('.r').first().find('a').first().attr('href'); if (!href) throw new Error('No Results'); href = querystring.parse(href.replace('/url?', '')); - return msg.edit(href.q); + return message.edit(href.q); } catch (err) { - return msg.edit('No Results Found.'); + return message.edit('No Results Found.'); } } }; diff --git a/commands/search/imdb.js b/commands/search/imdb.js index 031547cf..277aa31f 100644 --- a/commands/search/imdb.js +++ b/commands/search/imdb.js @@ -18,10 +18,10 @@ module.exports = class IMDBCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -46,9 +46,9 @@ module.exports = class IMDBCommand extends Command { body.Writer) .addField('**Actors:**', body.Actors); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The film may not have been found.'); + return msg.say('An Error Occurred. The film may not have been found.'); } } }; diff --git a/commands/search/lmgtfy.js b/commands/search/lmgtfy.js index 0a851e85..af69f53e 100644 --- a/commands/search/lmgtfy.js +++ b/commands/search/lmgtfy.js @@ -16,8 +16,8 @@ module.exports = class LMGTFYCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { query } = args; - return message.say(`http://lmgtfy.com/?iie=1&q=${query}`); + return msg.say(`http://lmgtfy.com/?iie=1&q=${query}`); } }; diff --git a/commands/search/map.js b/commands/search/map.js index f9ae36e7..8b15ad35 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -26,17 +26,17 @@ module.exports = class MapCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) - return message.say('This Command requires the `Attach Files` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) + return msg.say('This Command requires the `Attach Files` Permission.'); const { zoom, query } = args; try { const { body } = await request .get(`https://maps.googleapis.com/maps/api/staticmap?center=${query}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`); - return message.channel.send({files: [{attachment: body}]}); + return msg.channel.send({files: [{attachment: body}]}); } catch (err) { - return message.say('An Error Occurred. The location may not have been found.'); + return msg.say('An Error Occurred. The location may not have been found.'); } } }; diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 1a3d898e..d2d830eb 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -18,7 +18,7 @@ module.exports = class NeopetCommand extends Command { }); } - async run(message, args) { + async run(msg, args) { const { query } = args; try { const { text } = await request @@ -26,10 +26,10 @@ module.exports = class NeopetCommand extends Command { const $ = cheerio.load(text); const link = $('textarea').first().text(); if (!link.includes('cp')) - return message.say('This is not a valid pet name.'); - return message.say(link); + return msg.say('This is not a valid pet name.'); + return msg.say(link); } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/search/osu.js b/commands/search/osu.js index c3737233..c50df5f1 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -18,10 +18,10 @@ module.exports = class OsuCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -54,9 +54,9 @@ module.exports = class OsuCommand extends Command { body[0].count_rank_s, true) .addField('**A:**', body[0].count_rank_a, true); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The user may not have been found.'); + return msg.say('An Error Occurred. The user may not have been found.'); } } }; diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js index 68879e88..02864f02 100644 --- a/commands/search/soundcloud.js +++ b/commands/search/soundcloud.js @@ -18,10 +18,10 @@ module.exports = class SoundCloudCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -41,9 +41,9 @@ module.exports = class SoundCloudCommand extends Command { body[0].playback_count, true) .addField('**Favorited Count:**', body[0].favoritings_count, true); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The song may not have been found.'); + return msg.say('An Error Occurred. The song may not have been found.'); } } }; diff --git a/commands/search/urban.js b/commands/search/urban.js index 4dc71549..6faa10db 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -18,10 +18,10 @@ module.exports = class UrbanCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -34,9 +34,9 @@ module.exports = class UrbanCommand extends Command { .setDescription(body.list[0].definition.substr(0, 2000)) .addField('**Example:**', body.list[0].example.substr(0, 2000) || 'None'); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The word may not have been found.'); + return msg.say('An Error Occurred. The word may not have been found.'); } } }; diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 40aa5ac8..74b7dcea 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -18,10 +18,10 @@ module.exports = class WattpadCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -47,9 +47,9 @@ module.exports = class WattpadCommand extends Command { body.stories[0].readCount, true) .addField('**Comments:**', body.stories[0].commentCount, true); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The book may not have been found.'); + return msg.say('An Error Occurred. The book may not have been found.'); } } }; diff --git a/commands/search/weather.js b/commands/search/weather.js index 1cfa9b0d..dc41d75c 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -17,10 +17,10 @@ module.exports = class WeatherCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -54,9 +54,9 @@ module.exports = class WeatherCommand extends Command { body.query.results.channel.wind.direction, true) .addField('**Wind Speed:**', body.query.results.channel.wind.speed, true); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The location may not have been found.'); + return msg.say('An Error Occurred. The location may not have been found.'); } } }; diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index c8309140..0f8ef83b 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -18,10 +18,10 @@ module.exports = class WikipediaCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -31,10 +31,10 @@ module.exports = class WikipediaCommand extends Command { .setTitle(body.query.pages[0].title) .setURL(`https://en.wikipedia.org/wiki/${query}`) .setAuthor('Wikipedia', 'https://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/1122px-Wikipedia-logo-v2.svg.png') - .setDescription(body.query.pages[0].extract.substr(0, 2000).split('\n').join('\n\n')); - return message.embed(embed); + .setDescription(body.query.pages[0].extract.substr(0, 2000).replace(/[\n]/g, '\n\n')); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The page may not have been found.'); + return msg.say('An Error Occurred. The page may not have been found.'); } } }; diff --git a/commands/search/youtube.js b/commands/search/youtube.js index b7a18686..4d307e5f 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -18,10 +18,10 @@ module.exports = class YouTubeCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -33,9 +33,9 @@ module.exports = class YouTubeCommand extends Command { .setAuthor(`YouTube - ${body.items[0].snippet.channelTitle}`, 'https://cdn3.iconfinder.com/data/icons/social-icons-5/607/YouTube_Play.png') .setURL(`https://www.youtube.com/watch?v=${body.items[0].id.videoId}`) .setThumbnail(body.items[0].snippet.thumbnails.default.url); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The video may not have been found.'); + return msg.say('An Error Occurred. The video may not have been found.'); } } }; diff --git a/commands/search/yugioh.js b/commands/search/yugioh.js index fb060cc6..cabc0915 100644 --- a/commands/search/yugioh.js +++ b/commands/search/yugioh.js @@ -18,10 +18,10 @@ module.exports = class YuGiOhCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { const { body } = await request @@ -44,7 +44,7 @@ module.exports = class YuGiOhCommand extends Command { body.data.def, true) .addField('**Level:**', body.data.level, true); - return message.embed(embed); + return msg.embed(embed); } const embed = new RichEmbed() .setColor(0xBE5F1F) @@ -53,9 +53,9 @@ module.exports = class YuGiOhCommand extends Command { .setAuthor('Yu-Gi-Oh!', 'http://vignette3.wikia.nocookie.net/yugioh/images/1/10/Back-TF-EN-VG.png/revision/latest?cb=20120824043558') .addField('**Card Type:**', body.data.card_type, true); - return message.embed(embed); + return msg.embed(embed); } catch (err) { - return message.say('An Error Occurred. The card may not have been found.'); + return msg.say('An Error Occurred. The card may not have been found.'); } } }; diff --git a/commands/textedit/binary.js b/commands/textedit/binary.js index 271ddd19..53137ac4 100644 --- a/commands/textedit/binary.js +++ b/commands/textedit/binary.js @@ -1,10 +1,9 @@ const { Command } = require('discord.js-commando'); const binary = (str) => { - const pad = '00000000'; return unescape(encodeURIComponent(str)) .split('').map(str => { const binary = str.charCodeAt(0).toString(2); - return `${pad.slice(binary.length)}${binary}`; + return `${'00000000'.slice(binary.length)}${binary}`; }).join(''); }; @@ -29,8 +28,8 @@ module.exports = class BinaryCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.say(text); + return msg.say(text); } }; diff --git a/commands/textedit/cowsay.js b/commands/textedit/cowsay.js index a08ebc3f..6fa49acc 100644 --- a/commands/textedit/cowsay.js +++ b/commands/textedit/cowsay.js @@ -20,8 +20,8 @@ module.exports = class CowsayCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.code(null, `< ${text} >\n \\ ^__^\n \\ (oO)\\_______\n (__)\\ )\\/\\\n U ||----w |\n || ||`); + return msg.code(null, `< ${text} >\n \\ ^__^\n \\ (oO)\\_______\n (__)\\ )\\/\\\n U ||----w |\n || ||`); } }; diff --git a/commands/textedit/embed.js b/commands/textedit/embed.js index 0ea13257..9593094c 100644 --- a/commands/textedit/embed.js +++ b/commands/textedit/embed.js @@ -16,16 +16,16 @@ module.exports = class EmbedCommand extends Command { }); } - run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { text } = args; const embed = new RichEmbed() - .setAuthor(message.author.username, message.author.displayAvatarURL) + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0x00AE86) .setTimestamp() .setDescription(text); - return message.embed(embed); + return msg.embed(embed); } }; diff --git a/commands/textedit/morse.js b/commands/textedit/morse.js index e619cec2..74a1a52f 100644 --- a/commands/textedit/morse.js +++ b/commands/textedit/morse.js @@ -23,8 +23,8 @@ module.exports = class MorseCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.say(text); + return msg.say(text); } }; diff --git a/commands/textedit/pirate.js b/commands/textedit/pirate.js index d2cf0bcd..744f75ac 100644 --- a/commands/textedit/pirate.js +++ b/commands/textedit/pirate.js @@ -23,8 +23,8 @@ module.exports = class PirateCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.say(`\u180E${text}`); + return msg.say(`\u180E${text}`); } }; diff --git a/commands/textedit/reverse.js b/commands/textedit/reverse.js index d863b4e2..dca31494 100644 --- a/commands/textedit/reverse.js +++ b/commands/textedit/reverse.js @@ -16,8 +16,8 @@ module.exports = class ReverseCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.say(`\u180E${text}`); + return msg.say(`\u180E${text}`); } }; diff --git a/commands/textedit/say.js b/commands/textedit/say.js index 827bf908..2e48e09e 100644 --- a/commands/textedit/say.js +++ b/commands/textedit/say.js @@ -21,11 +21,11 @@ module.exports = class SayCommand extends Command { }); } - run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) - return message.say('This Command requires the `Manage Messages` Permission.'); + run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) + return msg.say('This Command requires the `Manage Messages` Permission.'); const { text } = args; - message.delete(); - return message.say(`\u180E${text}`); + msg.delete(); + return msg.say(`\u180E${text}`); } }; diff --git a/commands/textedit/temmie.js b/commands/textedit/temmie.js index 745b55de..750231cc 100644 --- a/commands/textedit/temmie.js +++ b/commands/textedit/temmie.js @@ -23,8 +23,8 @@ module.exports = class TemmieCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.say(`\u180E${text}`); + return msg.say(`\u180E${text}`); } }; diff --git a/commands/textedit/upsidedown.js b/commands/textedit/upsidedown.js index dc41130a..61f51396 100644 --- a/commands/textedit/upsidedown.js +++ b/commands/textedit/upsidedown.js @@ -21,8 +21,8 @@ module.exports = class UpsideDownCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.say(text); + return msg.say(text); } }; diff --git a/commands/textedit/webhook.js b/commands/textedit/webhook.js index e9693e45..d7110db5 100644 --- a/commands/textedit/webhook.js +++ b/commands/textedit/webhook.js @@ -25,12 +25,12 @@ module.exports = class WebhookCommand extends Command { return this.client.isOwner(msg.author); } - async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) - return message.say('This Command requires the `Manage Messages` Permission.'); + async run(msg, args) { + if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) + return msg.say('This Command requires the `Manage Messages` Permission.'); const { text } = args; try { - message.delete(); + msg.delete(); await request .post(process.env.WEBHOOK_URL) .send({ @@ -38,7 +38,7 @@ module.exports = class WebhookCommand extends Command { }); return null; } catch (err) { - return message.say('An Unknown Error Occurred.'); + return msg.say('An Unknown Error Occurred.'); } } }; diff --git a/commands/textedit/zalgo.js b/commands/textedit/zalgo.js index bf46e671..ff7027e7 100644 --- a/commands/textedit/zalgo.js +++ b/commands/textedit/zalgo.js @@ -23,8 +23,8 @@ module.exports = class ZalgoCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { text } = args; - return message.say(`\u180E${text}`); + return msg.say(`\u180E${text}`); } }; diff --git a/commands/userinfo/avatar.js b/commands/userinfo/avatar.js index c8556bb0..30871c99 100644 --- a/commands/userinfo/avatar.js +++ b/commands/userinfo/avatar.js @@ -15,8 +15,8 @@ module.exports = class AvatarCommand extends Command { }); } - run(message, args) { + run(msg, args) { const { user } = args; - return message.say(user.displayAvatarURL); + return msg.say(user.displayAvatarURL); } }; diff --git a/commands/userinfo/userinfo.js b/commands/userinfo/userinfo.js index a5bcd88f..fc558b11 100644 --- a/commands/userinfo/userinfo.js +++ b/commands/userinfo/userinfo.js @@ -24,12 +24,12 @@ module.exports = class UserInfoCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { user } = args; - const member = await message.guild.fetchMember(user); + const member = await msg.guild.fetchMember(user); let stat; let color; switch (user.presence.status) { @@ -65,6 +65,6 @@ module.exports = class UserInfoCommand extends Command { stat, true) .addField('**Playing:**', user.presence.game ? user.presence.game.name : 'None', true); - return message.embed(embed); + return msg.embed(embed); } }; diff --git a/commands/util/clearsetting.js b/commands/util/clearsetting.js index d554c9b1..79c0a31f 100644 --- a/commands/util/clearsetting.js +++ b/commands/util/clearsetting.js @@ -25,9 +25,9 @@ module.exports = class ClearSettingCommand extends Command { return msg.member.permissions.has('ADMINISTRATOR'); } - run(message, args) { + run(msg, args) { const { setting } = args; - message.guild.settings.remove(setting); - return message.say(`${setting} has been removed from your guild settings.`); + msg.guild.settings.remove(setting); + return msg.say(`${setting} has been removed from your guild settings.`); } }; diff --git a/commands/util/info.js b/commands/util/info.js index 57b0fbe4..a5fbb07b 100644 --- a/commands/util/info.js +++ b/commands/util/info.js @@ -17,10 +17,10 @@ module.exports = class InfoCommand extends Command { }); } - async run(message) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const guilds = await this.client.shard.fetchClientValues('guilds.size'); const memory = await this.client.shard.broadcastEval('Math.round(process.memoryUsage().heapUsed / 1024 / 1024)'); const embed = new RichEmbed() @@ -48,6 +48,6 @@ module.exports = class InfoCommand extends Command { '[commando](https://github.com/Gawdl3y/discord.js-commando), [zalgoize](https://github.com/clux/zalgolize), [superagent](https://github.com/visionmedia/superagent), [mathjs](http://mathjs.org/), [moment](http://momentjs.com), [moment-duration-format](https://github.com/jsmreese/moment-duration-format), [jimp](https://github.com/oliver-moran/jimp), [cheerio](https://cheerio.js.org/), [sequelize](http://docs.sequelizejs.com/en/v3/), [pg](https://github.com/brianc/node-postgres)') .addField('APIs', '[Wattpad](https://developer.wattpad.com/docs/api), [Wordnik](http://developer.wordnik.com/docs.html), [osu!](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices](http://docs.yugiohprices.apiary.io/#), [YouTube Data](https://developers.google.com/youtube/v3/), [Discord Bots](https://bots.discord.pw/api), [Today in History](http://history.muffinlabs.com/#api), [jService](http://jservice.io/), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Wikipedia](https://en.wikipedia.org/w/api.php), [Google Static Maps](https://developers.google.com/maps/documentation/static-maps/), [Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API), [rrrather](http://www.rrrather.com/botapi), [SoundCloud](https://developers.soundcloud.com/), [random.cat](http://random.cat/), [random.dog](https://random.dog/)'); - return message.embed(embed); + return msg.embed(embed); } }; diff --git a/commands/util/invite.js b/commands/util/invite.js index e98a5c9a..92df3c33 100644 --- a/commands/util/invite.js +++ b/commands/util/invite.js @@ -10,8 +10,8 @@ module.exports = class InviteCommand extends Command { }); } - async run(message) { + async run(msg) { const invite = await this.client.generateInvite('1345846343'); - return message.say(`Add me to your server with this link:\n${invite}\nOr, come to my server with this link:\n${this.client.options.invite}`); + return msg.say(`Add me to your server with this link:\n${invite}\nOr, come to my server with this link:\n${this.client.options.invite}`); } }; diff --git a/commands/util/memberchannel.js b/commands/util/memberchannel.js index 3fc09881..599a0103 100644 --- a/commands/util/memberchannel.js +++ b/commands/util/memberchannel.js @@ -20,9 +20,9 @@ module.exports = class MemberLogCommand extends Command { return msg.member.permissions.has('ADMINISTRATOR'); } - run(message, args) { + run(msg, args) { const { channel } = args; - message.guild.settings.set('memberLog', channel.name); - return message.say(`Member Log channel set to ${channel.name}.`); + msg.guild.settings.set('memberLog', channel.name); + return msg.say(`Member Log channel set to ${channel.name}.`); } }; diff --git a/commands/util/modchannel.js b/commands/util/modchannel.js index 8e3ca159..581f50eb 100644 --- a/commands/util/modchannel.js +++ b/commands/util/modchannel.js @@ -20,9 +20,9 @@ module.exports = class ModChannelCommand extends Command { return msg.member.permissions.has('ADMINISTRATOR'); } - run(message, args) { + run(msg, args) { const { channel } = args; - message.guild.settings.set('modLog', channel.name); - return message.say(`Mod Log channel set to ${channel.name}.`); + msg.guild.settings.set('modLog', channel.name); + return msg.say(`Mod Log channel set to ${channel.name}.`); } }; diff --git a/commands/util/shardinfo.js b/commands/util/shardinfo.js index 9eb1d506..8444d026 100644 --- a/commands/util/shardinfo.js +++ b/commands/util/shardinfo.js @@ -22,13 +22,13 @@ module.exports = class ShardInfoCommand extends Command { }); } - async run(message, args) { - if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) - return message.say('This Command requires the `Embed Links` Permission.'); + async run(msg, args) { + if (msg.channel.type !== 'dm') + if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) + return msg.say('This Command requires the `Embed Links` Permission.'); const { shard } = args; if (shard > this.client.options.shardCount - 1 || shard < 0) - return message.say('The Shard ID is not valid.'); + return msg.say('The Shard ID is not valid.'); const memory = await this.client.shard.broadcastEval('Math.round(process.memoryUsage().heapUsed / 1024 / 1024)'); const uptime = await this.client.shard.fetchClientValues('uptime'); const guilds = await this.client.shard.fetchClientValues('guilds.size'); @@ -41,6 +41,6 @@ module.exports = class ShardInfoCommand extends Command { `${memory[shard]}MB`, true) .addField('Uptime', moment.duration(uptime[shard]).format('d[d]h[h]m[m]s[s]'), true); - return message.embed(embed); + return msg.embed(embed); } }; diff --git a/commands/util/staffrole.js b/commands/util/staffrole.js index 6d5dd6c2..85dfedf0 100644 --- a/commands/util/staffrole.js +++ b/commands/util/staffrole.js @@ -20,9 +20,9 @@ module.exports = class StaffRoleCommand extends Command { return msg.member.permissions.has('ADMINISTRATOR'); } - run(message, args) { + run(msg, args) { const { role } = args; - message.guild.settings.set('staffRole', role.name); - return message.say(`Server Staff role set to ${role.name}.`); + msg.guild.settings.set('staffRole', role.name); + return msg.say(`Server Staff role set to ${role.name}.`); } }; diff --git a/commands/util/uptime.js b/commands/util/uptime.js index 72bd1771..eb2a7fc6 100644 --- a/commands/util/uptime.js +++ b/commands/util/uptime.js @@ -12,7 +12,7 @@ module.exports = class UptimeCommand extends Command { }); } - run(message) { - return message.say(`I've been active on this shard for: **${moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')}**!`); + run(msg) { + return msg.say(`I've been active on this shard for: **${moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')}**!`); } }; diff --git a/package.json b/package.json index 824dbcfe..6b61dbe0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "17.1.0", + "version": "17.1.1", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {