better errors

This commit is contained in:
Daniel Odendahl Jr
2017-05-16 17:35:53 +00:00
parent 92f7c05015
commit 6b4beb3bbe
49 changed files with 67 additions and 67 deletions
+1 -1
View File
@@ -16,6 +16,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.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'spam.png')] })
.catch(() => msg.say('An Error Occurred while sending the image.'));
.catch(err => msg.say(`${err.name}: ${err.message}`));
}
};