mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
further refine and update help page styling
This commit is contained in:
parent
c09dc73043
commit
7cd501f3f3
1 changed files with 5 additions and 3 deletions
|
@ -52,16 +52,18 @@ function createCommandPage(context, prefix, command, slashCommands) {
|
||||||
for (const a of command.argParser.args) {
|
for (const a of command.argParser.args) {
|
||||||
let argument = `-${a._name} <${a._type.replace('bool', 'true/false')}>`
|
let argument = `-${a._name} <${a._type.replace('bool', 'true/false')}>`
|
||||||
argument = pill(argument)
|
argument = pill(argument)
|
||||||
|
|
||||||
|
if (a.required) argument = "-# Required Parameter\n" + argument;
|
||||||
if (a.help) argument += ` ${a.help}`
|
if (a.help) argument += ` ${a.help}`
|
||||||
argument += `\n `
|
argument += `\n `
|
||||||
if (a.default !== "") argument += ` ${smallPill(`default: ${a.default}`)}`
|
if (a.default !== "") argument += ` ${smallPill(`default: ${a.default}`)}`
|
||||||
if (!a.required) argument += ` ${smallPill('optional')}`
|
|
||||||
args.push(argument)
|
args.push(argument)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let cPage = createEmbed("default", context, {
|
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: []
|
fields: []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -100,7 +102,7 @@ function createCommandPage(context, prefix, command, slashCommands) {
|
||||||
cPage.fields.push({
|
cPage.fields.push({
|
||||||
name: `${icon("example")} Examples`,
|
name: `${icon("example")} Examples`,
|
||||||
value: '```' + ex.join('``````') + '```',
|
value: '```' + ex.join('``````') + '```',
|
||||||
inline: false
|
inline: (command.metadata.usage.length <= 25)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return page(cPage);
|
return page(cPage);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue