further refine and update help page styling

This commit is contained in:
bignutty 2025-01-02 17:48:36 +01:00
parent c09dc73043
commit 7cd501f3f3

View file

@ -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);