From e26e14f3783816326a45f5af0c21fb4d9d75c42e Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 21 Mar 2020 17:52:06 -0400 Subject: [PATCH] Fix text --- commands/readme/generate-commands.js | 3 ++- commands/readme/generate-credit.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/readme/generate-commands.js b/commands/readme/generate-commands.js index ee729708..9813d690 100644 --- a/commands/readme/generate-commands.js +++ b/commands/readme/generate-commands.js @@ -19,6 +19,7 @@ module.exports = class GenerateCommandsCommand extends Command { .map(g => `\n### ${g.name}:\n\n${g.commands.filter(c => !c.hidden).map( c => `* **${c.name}:** ${c.description}${c.ownerOnly ? ' (Owner-Only)' : ''}${c.nsfw ? ' (NSFW)' : ''}` ).join('\n')}`); - return msg.channel.send({ files: [{ attachment: Buffer.from(list), name: 'commands.txt' }] }); + const text = `Total: ${this.client.registry.commands.size}\n${list.join('\n')}`; + return msg.channel.send({ files: [{ attachment: Buffer.from(text), name: 'commands.txt' }] }); } }; diff --git a/commands/readme/generate-credit.js b/commands/readme/generate-credit.js index dd953b36..0e61568f 100644 --- a/commands/readme/generate-credit.js +++ b/commands/readme/generate-credit.js @@ -48,6 +48,6 @@ module.exports = class GenerateCreditCommand extends Command { if (!cmd.reasonURL) return ` * ${cmd.name} (${cmd.reason})`; return ` * ${cmd.name} ([${cmd.reason}](${cmd.reasonURL}))`; }).join('\n')}`); - return msg.channel.send({ files: [{ attachment: Buffer.from(mapped), name: 'credit.txt' }] }); + return msg.channel.send({ files: [{ attachment: Buffer.from(mapped.join('\n')), name: 'credit.txt' }] }); } };