improvements

This commit is contained in:
Erik 2021-06-19 23:46:44 +03:00
parent 78b07446f6
commit 2ae872c2e8
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ class ModmailClient extends Client {
} }
this.logger.debug(`Executing command ${command.name}`); this.logger.debug(`${message.author.tag} is executing command ${command.name}`);
const result = await command.execute(message, { args, clean: message.content.replace(`${this.prefix}${commandName}`, '').trim() }).catch((err) => { const result = await command.execute(message, { args, clean: message.content.replace(`${this.prefix}${commandName}`, '').trim() }).catch((err) => {
this.logger.error(`Command ${command.name} errored during execution:\n${err.stack}`); this.logger.error(`Command ${command.name} errored during execution:\n${err.stack}`);
return { return {

View File

@ -35,7 +35,7 @@ class CannedReply extends Command {
} }
str += `**${name}:** ${content}\n`; str += `**${name}:** ${content}\n`;
} }
if (str.length) await channel.send(str).catch(this.client.logger.error.bind(this.client.logger)); if (str.length) return channel.send(str).catch(this.client.logger.error.bind(this.client.logger));
return '**__None__**'; return '**__None__**';
} }
return this.client.modmail.sendCannedResponse({ message, responseName: content.trim(), anon }); return this.client.modmail.sendCannedResponse({ message, responseName: content.trim(), anon });