From 29005a8945086e209397bd3c8ca46af00e5356d3 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 26 Apr 2017 17:37:53 +0000 Subject: [PATCH] Oops --- commands/avataredit/3000years.js | 2 +- commands/avataredit/beautiful.js | 2 +- commands/avataredit/bobross.js | 2 +- commands/avataredit/rip.js | 2 +- commands/avataredit/steamcard.js | 2 +- commands/games/mathgame.js | 2 +- commands/games/quiz.js | 2 +- commands/games/typinggame.js | 2 +- commands/guildinfo/guildinfo.js | 2 +- commands/imageedit/meme.js | 2 +- commands/moderation/ban.js | 6 +++--- commands/moderation/kick.js | 6 +++--- commands/moderation/lockdown.js | 4 ++-- commands/moderation/prune.js | 6 +++--- commands/moderation/unban.js | 6 +++--- commands/moderation/warn.js | 4 ++-- commands/random/nitro.js | 2 +- commands/random/spam.js | 2 +- commands/random/today.js | 2 +- commands/random/wouldyourather.js | 2 +- commands/randomimg/cat.js | 2 +- commands/randomimg/potato.js | 2 +- commands/randomimg/pun.js | 2 +- commands/randomimg/xiaopai.js | 2 +- commands/search/botinfo.js | 2 +- commands/search/define.js | 2 +- commands/search/discrim.js | 2 +- commands/search/forecast.js | 2 +- commands/search/imdb.js | 2 +- commands/search/map.js | 2 +- commands/search/osu.js | 2 +- commands/search/soundcloud.js | 2 +- commands/search/urban.js | 2 +- commands/search/wattpad.js | 2 +- commands/search/weather.js | 2 +- commands/search/wikipedia.js | 2 +- commands/search/youtube.js | 2 +- commands/search/yugioh.js | 2 +- commands/textedit/embed.js | 2 +- commands/textedit/say.js | 2 +- commands/textedit/webhook.js | 2 +- commands/userinfo/userinfo.js | 2 +- commands/util/info.js | 2 +- commands/util/shardinfo.js | 2 +- 44 files changed, 54 insertions(+), 54 deletions(-) diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index 0db3f99a..bc617b8b 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -21,7 +21,7 @@ module.exports = class YearsCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png'); diff --git a/commands/avataredit/beautiful.js b/commands/avataredit/beautiful.js index 07852324..879b81ef 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avataredit/beautiful.js @@ -21,7 +21,7 @@ module.exports = class BeautifulCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png'); diff --git a/commands/avataredit/bobross.js b/commands/avataredit/bobross.js index c9b142be..cc13e999 100644 --- a/commands/avataredit/bobross.js +++ b/commands/avataredit/bobross.js @@ -21,7 +21,7 @@ module.exports = class BobRossCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png'); diff --git a/commands/avataredit/rip.js b/commands/avataredit/rip.js index bde914d2..7bd703c6 100644 --- a/commands/avataredit/rip.js +++ b/commands/avataredit/rip.js @@ -22,7 +22,7 @@ module.exports = class RIPCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png'); diff --git a/commands/avataredit/steamcard.js b/commands/avataredit/steamcard.js index c4da6983..eafc5739 100644 --- a/commands/avataredit/steamcard.js +++ b/commands/avataredit/steamcard.js @@ -21,7 +21,7 @@ module.exports = class SteamCardCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const { user } = args; const username = message.guild ? message.guild.member(user).displayName : user.username; diff --git a/commands/games/mathgame.js b/commands/games/mathgame.js index 5b9e3fc9..ebb1c1d5 100644 --- a/commands/games/mathgame.js +++ b/commands/games/mathgame.js @@ -26,7 +26,7 @@ module.exports = class MathGameCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { difficulty } = args; const operation = operations[Math.floor(Math.random() * operations.length)]; diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 84d4170c..f818f66e 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -17,7 +17,7 @@ module.exports = class QuizCommand extends Command { async run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); try { const { body } = await request diff --git a/commands/games/typinggame.js b/commands/games/typinggame.js index 2bd70814..70844fc2 100644 --- a/commands/games/typinggame.js +++ b/commands/games/typinggame.js @@ -25,7 +25,7 @@ module.exports = class TypingGameCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { difficulty } = args; const sentence = sentences[Math.floor(Math.random() * sentences.length)]; diff --git a/commands/guildinfo/guildinfo.js b/commands/guildinfo/guildinfo.js index eaf065d6..d64b709b 100644 --- a/commands/guildinfo/guildinfo.js +++ b/commands/guildinfo/guildinfo.js @@ -20,7 +20,7 @@ module.exports = class GuildInfoCommand extends Command { } run(message) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const embed = new RichEmbed() .setColor(0x00AE86) diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index 8142eacd..8767ba2e 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -45,7 +45,7 @@ module.exports = class MemeCommand extends Command { run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const { type, toprow, bottomrow } = args; return message.channel.send({files: [`https://memegen.link/${type}/${toprow}/${bottomrow}.jpg`]}) diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index ef4fd58a..6e28da7f 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -31,16 +31,16 @@ module.exports = class BanCommand extends Command { } hasPermission(msg) { - return msg.member.hasPermission('BAN_MEMBERS'); + return msg.member.has('BAN_MEMBERS'); } async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS')) + 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', 'mod_logs'); if (!modlogs) return message.say('This Command requires a channel named `mod_logs`.'); - if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; if (!member.bannable) diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index ff6ad3f0..5adda3db 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -28,16 +28,16 @@ module.exports = class KickCommand extends Command { } hasPermission(msg) { - return msg.member.hasPermission('KICK_MEMBERS'); + return msg.member.has('KICK_MEMBERS'); } async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('KICK_MEMBERS')) + 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', 'mod_logs'); if (!modlogs) return message.say('This Command requires a channel named `mod_logs`.'); - if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; if (!member.kickable) diff --git a/commands/moderation/lockdown.js b/commands/moderation/lockdown.js index 1cf9644b..d5db543f 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -23,11 +23,11 @@ module.exports = class LockdownCommand extends Command { } hasPermission(msg) { - return msg.member.hasPermission('ADMINISTRATOR'); + return msg.member.has('ADMINISTRATOR'); } async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('ADMINISTRATOR')) + if (!message.channel.permissionsFor(this.client.user).has('ADMINISTRATOR')) return message.say('This Command requires the `Administrator` Permission.'); const { type } = args; if (type === 'start') { diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index 0e13c53e..0094a909 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -26,13 +26,13 @@ module.exports = class PruneCommand extends Command { } hasPermission(msg) { - return msg.member.hasPermission('MANAGE_MESSAGES'); + return msg.member.has('MANAGE_MESSAGES'); } async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGE_HISTORY')) + 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).hasPermission('MANAGE_MESSAGES')) + if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) return message.say('This Command requires the `Manage Messages` Permission.'); let { count } = args; count = count + 1; diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 07ef3923..984d8f6e 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -35,16 +35,16 @@ module.exports = class UnbanCommand extends Command { } hasPermission(msg) { - return msg.member.hasPermission('BAN_MEMBERS'); + return msg.member.has('BAN_MEMBERS'); } async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS')) + 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', 'mod_logs'); if (!modlogs) return message.say('This Command requires a channel named `mod_logs`.'); - if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { memberID, reason } = args; const bans = await message.guild.fetchBans(); diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index c50cb7d1..a2b030dc 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -27,14 +27,14 @@ module.exports = class WarnCommand extends Command { } hasPermission(msg) { - return msg.member.hasPermission('MANAGE_MESSAGES'); + return msg.member.has('MANAGE_MESSAGES'); } async run(message, args) { const modlogs = message.guild.channels.find('name', 'mod_logs'); if (!modlogs) return message.say('This Command requires a channel named `mod_logs`.'); - if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; try { diff --git a/commands/random/nitro.js b/commands/random/nitro.js index 0e5d2e06..8dd12e23 100644 --- a/commands/random/nitro.js +++ b/commands/random/nitro.js @@ -13,7 +13,7 @@ module.exports = class NitroCommand extends Command { run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const embed = new RichEmbed() .setAuthor('Discord Nitro') diff --git a/commands/random/spam.js b/commands/random/spam.js index de4f85de..1c830ce2 100644 --- a/commands/random/spam.js +++ b/commands/random/spam.js @@ -12,7 +12,7 @@ module.exports = class SpamCommand extends Command { run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + 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: ['./images/Spam.jpg']}); } diff --git a/commands/random/today.js b/commands/random/today.js index ade22acc..f81fbbf0 100644 --- a/commands/random/today.js +++ b/commands/random/today.js @@ -14,7 +14,7 @@ module.exports = class TodayCommand extends Command { async run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); try { const { text } = await request diff --git a/commands/random/wouldyourather.js b/commands/random/wouldyourather.js index c751bdca..dcfb5fcd 100644 --- a/commands/random/wouldyourather.js +++ b/commands/random/wouldyourather.js @@ -17,7 +17,7 @@ module.exports = class WouldYouRatherCommand extends Command { async run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); try { const { body } = await request diff --git a/commands/randomimg/cat.js b/commands/randomimg/cat.js index 24f9b36e..55b4234f 100644 --- a/commands/randomimg/cat.js +++ b/commands/randomimg/cat.js @@ -16,7 +16,7 @@ module.exports = class CatCommand extends Command { run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const cat = cats[Math.floor(Math.random() * cats.length)]; return message.channel.send({files: [`./images/Cat${cat}`]}); diff --git a/commands/randomimg/potato.js b/commands/randomimg/potato.js index 58714822..0c341935 100644 --- a/commands/randomimg/potato.js +++ b/commands/randomimg/potato.js @@ -16,7 +16,7 @@ module.exports = class PotatoCommand extends Command { run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const potato = potatoes[Math.floor(Math.random() * potatoes.length)]; return message.channel.send({files: [`./images/Potato${potato}`]}); diff --git a/commands/randomimg/pun.js b/commands/randomimg/pun.js index 93191b44..435db206 100644 --- a/commands/randomimg/pun.js +++ b/commands/randomimg/pun.js @@ -13,7 +13,7 @@ module.exports = class RandomPunCommand extends Command { run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const pun = puns[Math.floor(Math.random() * puns.length)]; return message.channel.send({files: [`./images/Pun${pun}`]}); diff --git a/commands/randomimg/xiaopai.js b/commands/randomimg/xiaopai.js index 2af74b27..5d14249c 100644 --- a/commands/randomimg/xiaopai.js +++ b/commands/randomimg/xiaopai.js @@ -16,7 +16,7 @@ module.exports = class XiaoCommand extends Command { run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const xiao = xiaos[Math.floor(Math.random() * xiaos.length)]; return message.channel.send({files: [`./images/Xiao${xiao}`]}); diff --git a/commands/search/botinfo.js b/commands/search/botinfo.js index 545130c0..8d43bcac 100644 --- a/commands/search/botinfo.js +++ b/commands/search/botinfo.js @@ -19,7 +19,7 @@ module.exports = class BotSearchCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); let { bot } = args; bot = bot.id; diff --git a/commands/search/define.js b/commands/search/define.js index 37b76c85..94786fb3 100644 --- a/commands/search/define.js +++ b/commands/search/define.js @@ -20,7 +20,7 @@ module.exports = class DefineCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { word } = args; try { diff --git a/commands/search/discrim.js b/commands/search/discrim.js index 0775fc61..ac9e7420 100644 --- a/commands/search/discrim.js +++ b/commands/search/discrim.js @@ -27,7 +27,7 @@ module.exports = class DiscrimCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.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(); diff --git a/commands/search/forecast.js b/commands/search/forecast.js index 3dcf0d7d..46fc4a95 100644 --- a/commands/search/forecast.js +++ b/commands/search/forecast.js @@ -19,7 +19,7 @@ module.exports = class ForecastCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { location } = args; try { diff --git a/commands/search/imdb.js b/commands/search/imdb.js index 81936fca..864518f7 100644 --- a/commands/search/imdb.js +++ b/commands/search/imdb.js @@ -20,7 +20,7 @@ module.exports = class IMDBCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { movie } = args; try { diff --git a/commands/search/map.js b/commands/search/map.js index 08c24820..a387c39c 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -28,7 +28,7 @@ module.exports = class MapCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) + if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) return message.say('This Command requires the `Attach Files` Permission.'); const { zoom, location } = args; try { diff --git a/commands/search/osu.js b/commands/search/osu.js index d9ae426b..4ac58f9b 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -20,7 +20,7 @@ module.exports = class OsuCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { username } = args; try { diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js index 2c0fcb80..85bae835 100644 --- a/commands/search/soundcloud.js +++ b/commands/search/soundcloud.js @@ -20,7 +20,7 @@ module.exports = class SoundCloudCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { diff --git a/commands/search/urban.js b/commands/search/urban.js index 42638d93..c6b38b7a 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -20,7 +20,7 @@ module.exports = class UrbanCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { word } = args; try { diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 04fd4c8e..f07997ff 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -20,7 +20,7 @@ module.exports = class WattpadCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { book } = args; try { diff --git a/commands/search/weather.js b/commands/search/weather.js index 318aa18d..62ec67c5 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -19,7 +19,7 @@ module.exports = class WeatherCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { location } = args; try { diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 65b11297..5678f976 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -20,7 +20,7 @@ module.exports = class WikipediaCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { query } = args; try { diff --git a/commands/search/youtube.js b/commands/search/youtube.js index 018cb962..1f152ca1 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -20,7 +20,7 @@ module.exports = class YouTubeCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { video } = args; try { diff --git a/commands/search/yugioh.js b/commands/search/yugioh.js index 92be9f54..4c6a8e3b 100644 --- a/commands/search/yugioh.js +++ b/commands/search/yugioh.js @@ -20,7 +20,7 @@ module.exports = class YuGiOhCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { card } = args; try { diff --git a/commands/textedit/embed.js b/commands/textedit/embed.js index 6ebcfb7f..c360711a 100644 --- a/commands/textedit/embed.js +++ b/commands/textedit/embed.js @@ -18,7 +18,7 @@ module.exports = class EmbedCommand extends Command { run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { text } = args; const embed = new RichEmbed() diff --git a/commands/textedit/say.js b/commands/textedit/say.js index 27d829f9..827bf908 100644 --- a/commands/textedit/say.js +++ b/commands/textedit/say.js @@ -22,7 +22,7 @@ module.exports = class SayCommand extends Command { } run(message, args) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES')) + if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) return message.say('This Command requires the `Manage Messages` Permission.'); const { text } = args; message.delete(); diff --git a/commands/textedit/webhook.js b/commands/textedit/webhook.js index 74f21d04..e9693e45 100644 --- a/commands/textedit/webhook.js +++ b/commands/textedit/webhook.js @@ -26,7 +26,7 @@ module.exports = class WebhookCommand extends Command { } async run(message, args) { - if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES')) + if (!message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) return message.say('This Command requires the `Manage Messages` Permission.'); const { text } = args; try { diff --git a/commands/userinfo/userinfo.js b/commands/userinfo/userinfo.js index fe86f0cd..a5bcd88f 100644 --- a/commands/userinfo/userinfo.js +++ b/commands/userinfo/userinfo.js @@ -26,7 +26,7 @@ module.exports = class UserInfoCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { user } = args; const member = await message.guild.fetchMember(user); diff --git a/commands/util/info.js b/commands/util/info.js index 1b29cf41..2bef277f 100644 --- a/commands/util/info.js +++ b/commands/util/info.js @@ -19,7 +19,7 @@ module.exports = class InfoCommand extends Command { async run(message) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const guilds = await this.client.shard.fetchClientValues('guilds.size'); const embed = new RichEmbed() diff --git a/commands/util/shardinfo.js b/commands/util/shardinfo.js index 7972bbef..b91e2199 100644 --- a/commands/util/shardinfo.js +++ b/commands/util/shardinfo.js @@ -24,7 +24,7 @@ module.exports = class ShardInfoCommand extends Command { async run(message, args) { if (message.channel.type !== 'dm') - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) + if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const { shardID } = args; if (shardID > this.client.options.shardCount - 1 || shardID < 0)