From 2aa72c0ea218374dd39a0eeb4fc0a9d33317be83 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Sun, 14 Feb 2021 20:35:06 +0100 Subject: [PATCH] better looking help command --- commands/help.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/commands/help.js b/commands/help.js index b710bd9..7d03b8e 100644 --- a/commands/help.js +++ b/commands/help.js @@ -7,12 +7,12 @@ module.exports = { name: 'help', description: 'List all available commands.', execute(message) { - let str = ''; + var commands = "" const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); const embed = new Discord.MessageEmbed() .setColor(15780145) - .setTitle("Help") + .setTitle("Commands") .setTimestamp() .setAuthor("soilens bot", "https://cdn.discordapp.com/avatars/481128222147477506/1a30f57f8e403f54aaca502012aeff14.png?size=2048") @@ -20,10 +20,14 @@ module.exports = { for (const file of commandFiles) { const command = require(`./${file}`); - embed.addFields( - { name: prefix+command.name, value: command.description }, - ) + console.log(command.name) + var commands = commands + `${prefix}${command.name} | ${command.description}\n` + + } + embed.addFields( + { name: "General",value: commands}, + ) message.channel.send(embed); },