From fd0aa705563dbfd2fec3dbfcb82bba50ea04421b Mon Sep 17 00:00:00 2001 From: Wizzard Date: Mon, 5 Feb 2024 22:38:35 -0500 Subject: [PATCH] Change help menu format --- commands/help.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/help.js b/commands/help.js index eefef7a..d84d20b 100644 --- a/commands/help.js +++ b/commands/help.js @@ -2,9 +2,15 @@ module.exports = { name: 'help', description: 'List all of my commands or info about a specific command.', execute(message, args, deleteTimeout) { - let reply = 'Here are my supported commands:\n\n'; + let reply = '```'; + reply += 'Here are the available commands:\n\n'; + const commands = Array.from(message.client.commands.values()); - reply += commands.map(command => `.${command.name} - ${command.description}`).join('\n'); + commands.forEach(command => { + reply += `.${command.name} - ${command.description}\n`; + }); + + reply += '```'; message.channel.send(reply).then(sentMessage => { setTimeout(() => sentMessage.delete().catch(console.error), deleteTimeout);