check for user perms in message create

merge-requests/5/head
Matthew 2020-04-15 15:12:56 -04:00
parent 3233e99a0e
commit 14711de6de
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ export default class {
if (!resolved) return; if (!resolved) return;
if (resolved.cmd.guildOnly && !(message.channel instanceof TextChannel)) return; if (resolved.cmd.guildOnly && !(message.channel instanceof TextChannel)) return;
if (!resolved.cmd.enabled) { message.channel.createMessage(`***${this.client.util.emojis.ERROR} This command has been disabled***`); return; } if (!resolved.cmd.enabled) { message.channel.createMessage(`***${this.client.util.emojis.ERROR} This command has been disabled***`); return; }
if (!resolved.cmd.checkPermissions(message.member)) return;
this.client.util.signale.info(`User '${message.author.username}#${message.author.discriminator}' ran command '${resolved.cmd.name}' in '${message.channel.id}'.`); this.client.util.signale.info(`User '${message.author.username}#${message.author.discriminator}' ran command '${resolved.cmd.name}' in '${message.channel.id}'.`);
await resolved.cmd.run(message, resolved.args); await resolved.cmd.run(message, resolved.args);
} catch (err) { } catch (err) {