forked from Galactic/galactic-bot
missing embed perms error handling
This commit is contained in:
parent
12e2660bf7
commit
d6d33ffd63
@ -394,7 +394,15 @@ class CommandHandler extends Observer {
|
||||
|
||||
const resolved = await message.resolve();
|
||||
if(resolved.error) {
|
||||
this.client.logger.error(`Command Error | ${message.command.resolveable} | Message ID: ${message.id}\n${resolved.message}`);
|
||||
this.client.logger.error(`Command Error | ${message.command.resolveable} | Message ID: ${message.id}\n${resolved.message || resolved.message.stack}`);
|
||||
if(resolved.message.code === 50013) {
|
||||
const missing = message.channel.permissionsFor(message.guild.me).missing(['EMBED_LINKS']);
|
||||
if(missing.length > 0) {
|
||||
return message.respond(message.format('COMMANDHANDLER_COMMAND_MISSINGPERMISSIONS'), {
|
||||
emoji: 'failure'
|
||||
});
|
||||
}
|
||||
}
|
||||
return this.handleError(message, { type: 'command' });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user