From b054a58bca76da43b3a22c0ac7771b5855b16d80 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 8 May 2017 21:41:54 +0000 Subject: [PATCH] Meow --- commands/avataredit/3000years.js | 6 +++--- commands/avataredit/beautiful.js | 6 +++--- commands/avataredit/bobross.js | 6 +++--- commands/avataredit/greyscale.js | 4 ++-- commands/avataredit/invert.js | 4 ++-- commands/avataredit/rip.js | 6 +++--- commands/avataredit/steamcard.js | 6 +++--- commands/avataredit/triggered.js | 6 +++--- commands/avataredit/wanted.js | 6 +++--- commands/games/mathgame.js | 2 +- commands/games/quiz.js | 2 +- commands/games/typinggame.js | 2 +- commands/moderation/ban.js | 4 ++-- commands/moderation/kick.js | 4 ++-- commands/moderation/lockdown.js | 4 ++-- commands/moderation/softban.js | 4 ++-- commands/moderation/unban.js | 4 ++-- commands/moderation/warn.js | 28 ++++++++++++---------------- commands/numedit/currency.js | 2 +- commands/random/meme.js | 2 +- commands/random/spam.js | 2 +- commands/random/strawpoll.js | 2 +- commands/random/today.js | 6 +++--- commands/random/wouldyourather.js | 2 +- commands/randomimg/cat.js | 4 ++-- commands/randomimg/dog.js | 4 ++-- commands/randomimg/xiaopai.js | 2 +- commands/search/botinfo.js | 2 +- commands/search/define.js | 2 +- commands/search/forecast.js | 2 +- commands/search/imdb.js | 2 +- commands/search/map.js | 4 ++-- commands/search/neopet.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/webhook.js | 2 +- 42 files changed, 79 insertions(+), 83 deletions(-) diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index 2082877f..3e646b3c 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -26,16 +26,16 @@ module.exports = class YearsCommand extends Command { const { user } = args; const avatarURL = user.avatarURL('png', 2048); if (!avatarURL) return msg.say('This user has no avatar.'); - let images = []; + const images = []; images.push(Jimp.read(avatarURL)); images.push(Jimp.read('https://i.imgur.com/eScwGFS.png')); const [avatar, az] = await Promise.all(images); avatar.resize(200, 200); az.composite(avatar, 461, 127); az.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'az.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/beautiful.js b/commands/avataredit/beautiful.js index 67a85aa9..1a4f6f7f 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avataredit/beautiful.js @@ -26,7 +26,7 @@ module.exports = class BeautifulCommand extends Command { const { user } = args; const avatarURL = user.avatarURL('png', 2048); if (!avatarURL) return msg.say('This user has no avatar.'); - let images = []; + const images = []; images.push(Jimp.read(avatarURL)); images.push(Jimp.read('https://i.imgur.com/71qLwPf.png')); const [avatar, grunkle] = await Promise.all(images); @@ -34,9 +34,9 @@ module.exports = class BeautifulCommand extends Command { grunkle.composite(avatar, 341, 35); grunkle.composite(avatar, 342, 301); grunkle.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'beautiful.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/bobross.js b/commands/avataredit/bobross.js index 0f04efa7..bca0d021 100644 --- a/commands/avataredit/bobross.js +++ b/commands/avataredit/bobross.js @@ -27,7 +27,7 @@ module.exports = class BobRossCommand extends Command { const avatarURL = user.avatarURL('png', 2048); if (!avatarURL) return msg.say('This user has no avatar.'); const blank = new Jimp(600, 775, 0xFFFFFFFF); - let images = []; + const images = []; images.push(Jimp.read(avatarURL)); images.push(Jimp.read('https://i.imgur.com/7NSiFLd.png')); const [avatar, bob] = await Promise.all(images); @@ -36,9 +36,9 @@ 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 msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'bobross.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/greyscale.js b/commands/avataredit/greyscale.js index 455fc2c6..354744e7 100644 --- a/commands/avataredit/greyscale.js +++ b/commands/avataredit/greyscale.js @@ -29,9 +29,9 @@ module.exports = class GreyscaleCommand extends Command { const avatar = await Jimp.read(avatarURL); avatar.greyscale(); avatar.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'greyscale.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/invert.js b/commands/avataredit/invert.js index b6a5fb48..ce2c3a78 100644 --- a/commands/avataredit/invert.js +++ b/commands/avataredit/invert.js @@ -28,9 +28,9 @@ module.exports = class InvertCommand extends Command { const avatar = await Jimp.read(avatarURL); avatar.invert(); avatar.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'invert.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/rip.js b/commands/avataredit/rip.js index 8370c29d..fbf54fb4 100644 --- a/commands/avataredit/rip.js +++ b/commands/avataredit/rip.js @@ -26,7 +26,7 @@ module.exports = class RIPCommand extends Command { const { user } = args; const avatarURL = user.avatarURL('png', 2048); if (!avatarURL) return msg.say('This user has no avatar.'); - let images = []; + const images = []; images.push(Jimp.read(avatarURL)); images.push(Jimp.read('https://i.imgur.com/KriteWm.jpg')); const [avatar, grave] = await Promise.all(images); @@ -34,9 +34,9 @@ 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 msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'rip.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/steamcard.js b/commands/avataredit/steamcard.js index f72e66f7..9a3d2c85 100644 --- a/commands/avataredit/steamcard.js +++ b/commands/avataredit/steamcard.js @@ -28,7 +28,7 @@ module.exports = class SteamCardCommand extends Command { const avatarURL = user.avatarURL('png', 2048); if (!avatarURL) return msg.say('This user has no avatar.'); const blank = new Jimp(494, 568, 0xFFFFFFFF); - let images = []; + const images = []; images.push(Jimp.read(avatarURL)); images.push(Jimp.read('https://i.imgur.com/JF0WwQX.png')); const [avatar, card] = await Promise.all(images); @@ -38,9 +38,9 @@ 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 msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'steamcard.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/triggered.js b/commands/avataredit/triggered.js index 3d88dff7..de493608 100644 --- a/commands/avataredit/triggered.js +++ b/commands/avataredit/triggered.js @@ -26,7 +26,7 @@ module.exports = class TriggeredCommand extends Command { const avatarURL = user.avatarURL('png', 2048); if (!avatarURL) return msg.say('This user has no avatar.'); const blank = new Jimp(320, 371, 0xFFFFFFFF); - let images = []; + const images = []; images.push(Jimp.read(avatarURL)); images.push(Jimp.read('https://i.imgur.com/tF9yF62.png')); const [avatar, triggered] = await Promise.all(images); @@ -34,9 +34,9 @@ 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 msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'triggered.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/avataredit/wanted.js b/commands/avataredit/wanted.js index a065ecf4..0fcadf0a 100644 --- a/commands/avataredit/wanted.js +++ b/commands/avataredit/wanted.js @@ -25,16 +25,16 @@ module.exports = class WantedCommand extends Command { const { user } = args; const avatarURL = user.avatarURL('png', 2048); if (!avatarURL) return msg.say('This user has no avatar.'); - let images = []; + const images = []; images.push(Jimp.read(avatarURL)); images.push(Jimp.read('https://i.imgur.com/ca09TG5.jpg')); const [avatar, wanted] = await Promise.all(images); avatar.resize(500, 500); wanted.composite(avatar, 189, 438); wanted.getBuffer(Jimp.MIME_PNG, (err, buff) => { - if (err) return msg.say(`An Error Occurred: ${err}`); + if (err) return msg.say(err); return msg.channel.send({ files: [{ attachment: buff, name: 'wanted.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); }); } }; diff --git a/commands/games/mathgame.js b/commands/games/mathgame.js index b6e0e482..7fb506ba 100644 --- a/commands/games/mathgame.js +++ b/commands/games/mathgame.js @@ -54,7 +54,7 @@ module.exports = class MathGameCommand extends Command { const embed = new RichEmbed() .setTitle('You have **10** seconds to answer:') .setDescription(expression); - await msg.embed(embed); + msg.embed(embed); try { const collected = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 175f6a3f..eb52f62d 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -28,7 +28,7 @@ module.exports = class QuizCommand extends Command { **Category: ${body[0].category.title}** ${body[0].question} `); - await msg.embed(embed); + msg.embed(embed); try { const collected = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, diff --git a/commands/games/typinggame.js b/commands/games/typinggame.js index 040329d6..2292dc6f 100644 --- a/commands/games/typinggame.js +++ b/commands/games/typinggame.js @@ -51,7 +51,7 @@ module.exports = class TypingGameCommand extends Command { const embed = new RichEmbed() .setTitle(`You have **${time / 1000}** seconds to type:`) .setDescription(sentence); - await msg.embed(embed); + msg.embed(embed); try { const collected = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 29b0ebcd..86b66212 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -55,7 +55,7 @@ module.exports = class BanCommand extends Command { await msg.say('Failed to send DM to the user.'); } await member.ban({ days: 7, reason }); - await msg.say(':ok_hand:'); + msg.say(':ok_hand:'); const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFF0000) @@ -67,7 +67,7 @@ module.exports = class BanCommand extends Command { `); return modlogs.send({ embed }); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index c01239e3..cc943542 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -54,7 +54,7 @@ module.exports = class KickCommand extends Command { await msg.say('Failed to send DM.'); } await member.kick({ reason }); - await msg.say(':ok_hand:'); + msg.say(':ok_hand:'); const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFFA500) @@ -66,7 +66,7 @@ module.exports = class KickCommand extends Command { `); return modlogs.send({ embed }); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/moderation/lockdown.js b/commands/moderation/lockdown.js index bc408017..f07db6f7 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -40,14 +40,14 @@ module.exports = class LockdownCommand extends Command { Please use \`lockdown stop\` to end the lockdown. `); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } else if (type === 'stop') { try { await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: true }); return msg.say('Lockdown Ended, users without Administrator can now post messages.'); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } } diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index c3164d2c..3fd543c1 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -58,7 +58,7 @@ module.exports = class SoftbanCommand extends Command { } await member.ban({ days: 7, reason }); await msg.guild.unban(member.user); - await msg.say(':ok_hand:'); + msg.say(':ok_hand:'); const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFF4500) @@ -70,7 +70,7 @@ module.exports = class SoftbanCommand extends Command { `); return modlogs.send({ embed }); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 0250b450..373528f9 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -53,7 +53,7 @@ module.exports = class UnbanCommand extends Command { const member = bans.get(id); try { await msg.guild.unban(member); - await msg.say(':ok_hand:'); + msg.say(':ok_hand:'); const embed = new RichEmbed() .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0x00AE86) @@ -65,7 +65,7 @@ module.exports = class UnbanCommand extends Command { `); return modlogs.send({ embed }); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index 2a74812f..490a1cf4 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -33,7 +33,7 @@ module.exports = class WarnCommand extends Command { return msg.member.hasPermission('KICK_MEMBERS') || msg.member.roles.has(msg.guild.settings.get('staffRole')); } - async run(msg, args) { + run(msg, args) { const modlogs = msg.guild.channels.get(msg.guild.settings.get('modLog')); if (!modlogs) return msg.say('This Command requires a channel set with the `modchannel` command.'); if (!modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) @@ -41,20 +41,16 @@ module.exports = class WarnCommand extends Command { if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) return msg.say('This Command requires the `Embed Links` Permission.'); const { member, reason } = args; - try { - await msg.say(':ok_hand:'); - const embed = new RichEmbed() - .setAuthor(msg.author.tag, msg.author.displayAvatarURL) - .setColor(0xFFFF00) - .setTimestamp() - .setDescription(stripIndents` - **Member:** ${member.user.tag} (${member.id}) - **Action:** Warn - **Reason:** ${reason} - `); - return modlogs.send({ embed }); - } catch (err) { - return msg.say(`An Error Occurred: ${err}`); - } + msg.say(':ok_hand:'); + const embed = new RichEmbed() + .setAuthor(msg.author.tag, msg.author.displayAvatarURL) + .setColor(0xFFFF00) + .setTimestamp() + .setDescription(stripIndents` + **Member:** ${member.user.tag} (${member.id}) + **Action:** Warn + **Reason:** ${reason} + `); + return modlogs.send({ embed }); } }; diff --git a/commands/numedit/currency.js b/commands/numedit/currency.js index 6ef253ea..70e46c37 100644 --- a/commands/numedit/currency.js +++ b/commands/numedit/currency.js @@ -49,7 +49,7 @@ module.exports = class CurrencyCommand extends Command { const rate = body.rates[to]; return msg.say(`${amount} ${base} is ${amount * rate} ${to}.`); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/random/meme.js b/commands/random/meme.js index 0dfee015..13237082 100644 --- a/commands/random/meme.js +++ b/commands/random/meme.js @@ -42,6 +42,6 @@ module.exports = class MemeCommand extends Command { return msg.say('This Command requires the `Attach Files` Permission.'); const { type, top, bottom } = args; return msg.channel.send({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); } }; diff --git a/commands/random/spam.js b/commands/random/spam.js index abf47fbb..270f0b95 100644 --- a/commands/random/spam.js +++ b/commands/random/spam.js @@ -15,6 +15,6 @@ module.exports = class SpamCommand extends Command { 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'] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); } }; diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index 2f466052..99329bf1 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -46,7 +46,7 @@ module.exports = class StrawpollCommand extends Command { http://strawpoll.me/${body.id} `); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/random/today.js b/commands/random/today.js index 412eeb9b..79df1442 100644 --- a/commands/random/today.js +++ b/commands/random/today.js @@ -22,16 +22,16 @@ module.exports = class TodayCommand extends Command { .buffer(true); const parsed = JSON.parse(text); const events = parsed.data.Events; - const random = Math.floor(Math.random() * events.length); + const event = events[Math.floor(Math.random() * events.length)]; const embed = new RichEmbed() .setColor(0x9797FF) .setURL(parsed.url) .setTitle(`On this day (${parsed.date})...`) .setTimestamp() - .setDescription(`${events[random].year}: ${events[random].text}`); + .setDescription(`${event.year}: ${event.text}`); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/random/wouldyourather.js b/commands/random/wouldyourather.js index 787926dc..58c7c040 100644 --- a/commands/random/wouldyourather.js +++ b/commands/random/wouldyourather.js @@ -27,7 +27,7 @@ module.exports = class WouldYouRatherCommand extends Command { .setDescription(`${body.choicea} OR ${body.choiceb}?`); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/randomimg/cat.js b/commands/randomimg/cat.js index 9f7123ca..b11564a0 100644 --- a/commands/randomimg/cat.js +++ b/commands/randomimg/cat.js @@ -20,9 +20,9 @@ module.exports = class CatCommand extends Command { const { body } = await request .get('http://random.cat/meow'); return msg.channel.send({ files: [body.file] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/randomimg/dog.js b/commands/randomimg/dog.js index 7203778d..8ef25dea 100644 --- a/commands/randomimg/dog.js +++ b/commands/randomimg/dog.js @@ -19,9 +19,9 @@ module.exports = class DogCommand extends Command { const { body } = await request .get('https://random.dog/woof.json'); return msg.channel.send({ files: [body.url] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/randomimg/xiaopai.js b/commands/randomimg/xiaopai.js index 8ec6d178..b921de7f 100644 --- a/commands/randomimg/xiaopai.js +++ b/commands/randomimg/xiaopai.js @@ -18,6 +18,6 @@ module.exports = class XiaoCommand extends Command { return msg.say('This Command requires the `Attach Files` Permission.'); const xiao = xiaos[Math.floor(Math.random() * xiaos.length)]; return msg.channel.send({ files: [xiao] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); } }; diff --git a/commands/search/botinfo.js b/commands/search/botinfo.js index a73c3b6a..25433b45 100644 --- a/commands/search/botinfo.js +++ b/commands/search/botinfo.js @@ -42,7 +42,7 @@ module.exports = class BotSearchCommand extends Command { body.prefix, true); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/define.js b/commands/search/define.js index f5e7d68f..37585e75 100644 --- a/commands/search/define.js +++ b/commands/search/define.js @@ -35,7 +35,7 @@ module.exports = class DefineCommand extends Command { .setDescription(body[0].text); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/forecast.js b/commands/search/forecast.js index 16d69cf3..5a2f2356 100644 --- a/commands/search/forecast.js +++ b/commands/search/forecast.js @@ -50,7 +50,7 @@ module.exports = class ForecastCommand extends Command { `**High:** ${forecasts[6].high}°F, **Low:** ${forecasts[6].low}°F, **Condition:** ${forecasts[6].text}`); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/imdb.js b/commands/search/imdb.js index 731a00ef..4900e1c1 100644 --- a/commands/search/imdb.js +++ b/commands/search/imdb.js @@ -51,7 +51,7 @@ module.exports = class IMDBCommand extends Command { body.Actors); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/map.js b/commands/search/map.js index d5eec4e4..81c1f00e 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -39,9 +39,9 @@ module.exports = class MapCommand extends Command { const { body } = await request .get(`https://maps.googleapis.com/maps/api/staticmap?center=${query}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`); return msg.channel.send({ files: [{ attachment: body, name: 'map.png' }] }) - .catch(err => msg.say(`An Error Occurred: ${err}`)); + .catch(err => msg.say(err)); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/neopet.js b/commands/search/neopet.js index a090382f..24be511a 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -30,7 +30,7 @@ module.exports = class NeopetCommand extends Command { if (!link.includes('cp')) throw new Error('Invalid Pet Name.'); return msg.say(link); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/osu.js b/commands/search/osu.js index 21d9be69..3fb6bfb3 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -59,7 +59,7 @@ module.exports = class OsuCommand extends Command { body[0].count_rank_a, true); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/soundcloud.js b/commands/search/soundcloud.js index cdd32bc1..cfca8c15 100644 --- a/commands/search/soundcloud.js +++ b/commands/search/soundcloud.js @@ -46,7 +46,7 @@ module.exports = class SoundCloudCommand extends Command { body[0].favoritings_count, true); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/urban.js b/commands/search/urban.js index 76a55e60..f8aed81c 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -39,7 +39,7 @@ module.exports = class UrbanCommand extends Command { body.list[0].example.substr(0, 2000) || 'None'); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index ddcecdcf..0cc73cf5 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -50,7 +50,7 @@ module.exports = class WattpadCommand extends Command { body.stories[0].commentCount, true); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/weather.js b/commands/search/weather.js index 6e5951bf..d96eef20 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -59,7 +59,7 @@ module.exports = class WeatherCommand extends Command { body.query.results.channel.wind.speed, true); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index bb77c856..60f0e0e2 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -37,7 +37,7 @@ module.exports = class WikipediaCommand extends Command { .setDescription(body.query.pages[0].extract.substr(0, 2000).replace(/[\n]/g, '\n\n')); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/youtube.js b/commands/search/youtube.js index b9607658..c7db1c25 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -38,7 +38,7 @@ module.exports = class YouTubeCommand extends Command { .setThumbnail(body.items[0].snippet.thumbnails.default.url); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/search/yugioh.js b/commands/search/yugioh.js index 4bc5245c..751eae50 100644 --- a/commands/search/yugioh.js +++ b/commands/search/yugioh.js @@ -58,7 +58,7 @@ module.exports = class YuGiOhCommand extends Command { body.data.card_type, true); return msg.embed(embed); } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } }; diff --git a/commands/textedit/webhook.js b/commands/textedit/webhook.js index 8a7dff2f..31a48e31 100644 --- a/commands/textedit/webhook.js +++ b/commands/textedit/webhook.js @@ -35,7 +35,7 @@ module.exports = class WebhookCommand extends Command { .send({ content }); return null; } catch (err) { - return msg.say(`An Error Occurred: ${err}`); + return msg.say(err); } } };