diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index 239304ce..62b5587d 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -35,7 +35,7 @@ module.exports = class YearsCommand extends Command { az.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/beautiful.js b/commands/avataredit/beautiful.js index c30a1f7b..bdf9335f 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avataredit/beautiful.js @@ -36,7 +36,7 @@ module.exports = class BeautifulCommand extends Command { grunkle.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/bobross.js b/commands/avataredit/bobross.js index 11bb9ab2..50ba666e 100644 --- a/commands/avataredit/bobross.js +++ b/commands/avataredit/bobross.js @@ -38,7 +38,7 @@ module.exports = class BobRossCommand extends Command { blank.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/greyscale.js b/commands/avataredit/greyscale.js index 4837b85e..e9853fcd 100644 --- a/commands/avataredit/greyscale.js +++ b/commands/avataredit/greyscale.js @@ -28,7 +28,7 @@ module.exports = class GreyscaleCommand extends Command { avatar.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/invert.js b/commands/avataredit/invert.js index db63ecb5..05fbc12a 100644 --- a/commands/avataredit/invert.js +++ b/commands/avataredit/invert.js @@ -28,7 +28,7 @@ module.exports = class InvertCommand extends Command { avatar.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/rip.js b/commands/avataredit/rip.js index 9f1fa106..104c7a7e 100644 --- a/commands/avataredit/rip.js +++ b/commands/avataredit/rip.js @@ -37,7 +37,7 @@ module.exports = class RIPCommand extends Command { grave.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/steamcard.js b/commands/avataredit/steamcard.js index c0f0524a..27c2e911 100644 --- a/commands/avataredit/steamcard.js +++ b/commands/avataredit/steamcard.js @@ -40,7 +40,7 @@ module.exports = class SteamCardCommand extends Command { blank.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/triggered.js b/commands/avataredit/triggered.js index ed82a11e..17a4e9d2 100644 --- a/commands/avataredit/triggered.js +++ b/commands/avataredit/triggered.js @@ -34,7 +34,7 @@ module.exports = class TriggeredCommand extends Command { blank.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/avataredit/wanted.js b/commands/avataredit/wanted.js index e11b3000..4a91eb13 100644 --- a/commands/avataredit/wanted.js +++ b/commands/avataredit/wanted.js @@ -32,7 +32,7 @@ module.exports = class WantedCommand extends Command { wanted.getBuffer(Jimp.MIME_PNG, (err, buff) => { if (err) return msg.say('An Unknown Error Occurred.'); return msg.channel.send({files: [{attachment: buff}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); }); } }; diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index 8e023dfc..1fefbeb9 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -49,6 +49,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(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); } }; diff --git a/commands/random/spam.js b/commands/random/spam.js index 2249021a..4ec519b7 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(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); } }; diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index 55ea7224..bf1aa535 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -45,8 +45,7 @@ module.exports = class StrawpollCommand extends Command { options: choices }); return msg.say(`${body.title}\nhttp://strawpoll.me/${body.id}`); - } - catch (err) { + } catch (err) { return msg.say('An Unknown Error Occurred.'); } } diff --git a/commands/randomimg/cat.js b/commands/randomimg/cat.js index b586ec60..ad76bf3f 100644 --- a/commands/randomimg/cat.js +++ b/commands/randomimg/cat.js @@ -22,7 +22,7 @@ module.exports = class CatCommand extends Command { const { body } = await request .get('http://random.cat/meow'); return msg.channel.send({files: [body.file]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); } catch (err) { return msg.say('An Unknown Error Occurred.'); } diff --git a/commands/randomimg/dog.js b/commands/randomimg/dog.js index 01cee3dc..c8817b78 100644 --- a/commands/randomimg/dog.js +++ b/commands/randomimg/dog.js @@ -19,7 +19,7 @@ module.exports = class DogCommand extends Command { const { body } = await request .get('https://random.dog/woof.json'); return msg.channel.send({files: [body.url]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); } catch (err) { return msg.say('An Unknown Error Occurred.'); } diff --git a/commands/randomimg/xiaopai.js b/commands/randomimg/xiaopai.js index 09d94ac6..2ac71c56 100644 --- a/commands/randomimg/xiaopai.js +++ b/commands/randomimg/xiaopai.js @@ -20,6 +20,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(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); } }; diff --git a/commands/search/map.js b/commands/search/map.js index 419f9355..cc313265 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -35,7 +35,7 @@ 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}]}) - .catch(() => msg.say('An Unknown Error Occurred.')); + .catch(err => msg.say(`An Error Occurred: ${err}`)); } catch (err) { return msg.say('An Error Occurred. The location may not have been found.'); }