From 1dc7ee8a49072daa227e2fb1e09b8947c2a96806 Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Mon, 13 Mar 2023 09:30:15 +0700 Subject: [PATCH] imposter help discord fix yes --- commands/help.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/commands/help.js b/commands/help.js index 891a93c..d65e264 100644 --- a/commands/help.js +++ b/commands/help.js @@ -105,12 +105,24 @@ module.exports = { if (command.alias.toString() !== '') { alias = command.alias.join(', ') } + + const usage = [] + if (typeof command.usage === 'string') { + usage.push(`${prefix}${command.name} ${command.usage}`) + } else { + for (const value of command.usage) { + usage.push(`${prefix}${command.name} ${value}`) + usage.push('\n') + } + usage.pop() + } + const Embed = new EmbedBuilder() .setColor(config.discord.embedsColors.normal) .setTitle(`${prefix + command.name} (${alias}) - ${command.description}`) .setDescription(`Trust level: ${command.trusted} Supported: ${command.discordExecute ? 'true' : 'false'} - ${prefix + command.name} ${command.usage}` + ${usage}` ) channeldc.send({ embeds: [Embed] }) }