trying something

This commit is contained in:
Erik 2021-11-29 15:23:14 +02:00
parent f6c58b3662
commit c09dba2f41
No known key found for this signature in database
GPG Key ID: FEFF4B220DDF5589

View File

@ -31,12 +31,12 @@ class CannedReply extends Command {
// eslint-disable-next-line no-shadow // eslint-disable-next-line no-shadow
for (const [ name, content ] of list) { for (const [ name, content ] of list) {
if (str.length + content.length > 2000) { if (str.length + content.length > 2000) {
await channel.send(str).catch(err => this.client.logger.error(`CannedReply.execute errored at channel.send:\n${err.stack}`)); await channel.send(str); // .catch(err => this.client.logger.error(`CannedReply.execute errored at channel.send:\n${err.stack}`));
str = ''; str = '';
} }
str += `**${name}:** ${content}\n`; str += `**${name}:** ${content}\n`;
} }
if (str.length) return channel.send(str).catch(err => this.client.logger.error(`CannedReply.execute errored at channel.send:\n${err.stack}`)); if (str.length) return channel.send(str); // .catch(err => this.client.logger.error(`CannedReply.execute errored at channel.send:\n${err.stack}`));
return '**__None__**'; return '**__None__**';
} }
return this.client.modmail.sendCannedResponse({ message, responseName: content.trim(), anon }); return this.client.modmail.sendCannedResponse({ message, responseName: content.trim(), anon });