Bug Catching in File Commands

This commit is contained in:
Daniel Odendahl Jr
2017-05-02 11:18:51 +00:00
parent 4fd695c655
commit a9d29cdec4
15 changed files with 29 additions and 15 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ module.exports = class SpamCommand extends Command {
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']});
return msg.channel.send({files: ['https://i.imgur.com/2JFu5xE.jpg']})
.catch(() => msg.say('An Unknown Error Occurred.'));
}
};