From 7cd501f3f335c3ceaf31e2357f64d7654cc2c5dd Mon Sep 17 00:00:00 2001 From: bignutty <3515180-bignutty@users.noreply.gitlab.com> Date: Thu, 2 Jan 2025 17:48:36 +0100 Subject: [PATCH] further refine and update help page styling --- commands/message/core/help.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/commands/message/core/help.js b/commands/message/core/help.js index e7d1522..5b6c417 100644 --- a/commands/message/core/help.js +++ b/commands/message/core/help.js @@ -52,16 +52,18 @@ function createCommandPage(context, prefix, command, slashCommands) { for (const a of command.argParser.args) { let argument = `-${a._name} <${a._type.replace('bool', 'true/false')}>` argument = pill(argument) + + if (a.required) argument = "-# Required Parameter\n" + argument; if (a.help) argument += ` ​ ${a.help}` argument += `\n ​ ​ ` if (a.default !== "") argument += ` ​ ​ ${smallPill(`default: ${a.default}`)}` - if (!a.required) argument += ` ​ ​ ${smallPill('optional')}` + args.push(argument) } } let cPage = createEmbed("default", context, { - description: `### ${icon("slash")} ${command.name}\n${alias}${explicit}\n${command.metadata.description}`, + description: `### ${command.name}\n${alias}${explicit}\n${command.metadata.description}`, fields: [] }) @@ -100,7 +102,7 @@ function createCommandPage(context, prefix, command, slashCommands) { cPage.fields.push({ name: `${icon("example")} Examples`, value: '```' + ex.join('``````') + '```', - inline: false + inline: (command.metadata.usage.length <= 25) }) } return page(cPage);