From d6689132a1bd035a5d36259aa5be2238e308830f Mon Sep 17 00:00:00 2001 From: Matthew R Date: Wed, 6 May 2020 19:32:51 -0400 Subject: [PATCH] disabled val on set to true --- src/class/Util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index c0798c5..7bc3c76 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -70,7 +70,7 @@ export default class Util { || members.find((m) => m.username.toLowerCase().startsWith(query.toLowerCase()) || (m.nick && m.nick.toLowerCase().startsWith(query.toLowerCase()))); } - public async handleError(error: Error, message?: Message, command?: Command, disable?: boolean): Promise { + public async handleError(error: Error, message?: Message, command?: Command, disable = true): Promise { try { this.signale.error(error); const info = { content: `\`\`\`js\n${error.stack}\n\`\`\``, embed: null }; @@ -93,7 +93,7 @@ export default class Util { const msg = message ? message.content.slice(this.client.config.prefix.length).trim().split(/ +/g) : []; // eslint-disable-next-line no-param-reassign 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 && disable ? ' This command has been disabled.' : ''}***`); + if (message) message.channel.createMessage(`***${this.emojis.ERROR} An unexpected error has occured - please contact a Staff member.${command && disable ? ' This command has been disabled.' : ''}***`); } catch (err) { this.signale.error(err); }