diff --git a/src/class/Moderation.ts b/src/class/Moderation.ts index 565543f..fa463bc 100644 --- a/src/class/Moderation.ts +++ b/src/class/Moderation.ts @@ -15,7 +15,9 @@ export default class Moderation { constructor(client: Client) { this.client = client; - this.logChannels.modlogs = channels.modlogs; + this.logChannels = { + modlogs: channels.modlogs, + }; } public checkPermissions(member: Member, moderator: Member): boolean { diff --git a/src/class/Util.ts b/src/class/Util.ts index bcd39cb..4744c70 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -96,7 +96,7 @@ export default class Util { return member; } - public async handleError(error: Error, message?: Message, command?: Command): Promise { + public async handleError(error: Error, message?: Message, command?: Command, disable?: boolean): Promise { try { this.signale.error(error); const info = { content: `\`\`\`js\n${error.stack}\n\`\`\``, embed: null }; @@ -118,7 +118,7 @@ export default class Util { await this.client.createMessage('595788220764127272', info); const msg = message.content.slice(this.client.config.prefix.length).trim().split(/ +/g); // eslint-disable-next-line no-param-reassign - if (command) this.resolveCommand(msg).then((c) => { c.cmd.enabled = false; }); + if (command && disable) this.resolveCommand(msg).then((c) => { c.cmd.enabled = false; }); if (message) message.channel.createMessage(`***${this.emojis.ERROR} An unexpected error has occured - please contact a Faculty Marshal.${command ? ' This command has been disabled.' : ''}***`); } catch (err) { this.signale.error(err);