diff --git a/structure/client/components/observers/CommandHandler.js b/structure/client/components/observers/CommandHandler.js index 1b4b937..a04198c 100644 --- a/structure/client/components/observers/CommandHandler.js +++ b/structure/client/components/observers/CommandHandler.js @@ -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' }); }