use pill helper

This commit is contained in:
derpystuff 2022-10-09 23:26:23 +02:00
parent 974f5c6a53
commit 1e880ded55

View file

@ -1,4 +1,4 @@
const { codeblock, highlight, icon, link } = require('../../../labscore/utils/markdown')
const { codeblock, highlight, icon, link, pill } = require('../../../labscore/utils/markdown')
const { createEmbed, formatPaginationEmbeds } = require('../../../labscore/utils/embed')
const { DISCORD_INVITES } = require('../../../labscore/constants')
@ -12,7 +12,7 @@ function createHelpPage(context, title, contents, descriptions){
createEmbed("default", context, {
description: `${title}\n\n` +
renderCommandList(contents, descriptions) +
`\n\n${icon("question")} Use ${highlight(` ${context.commandClient.prefixes.custom.first()}help <command> `)} to view more information about a command.`
`\n\n${icon("question")} Use ${pill(`${context.commandClient.prefixes.custom.first()}help <command>`)} to view more information about a command.`
})
]
}
@ -39,10 +39,14 @@ function renderCommandList(commands, descriptions, limit){
}
function createCommandPage(context, prefix, command){
alias = ''
if(command.aliases.length >= 1) alias = ' ` ' + command.aliases.join(' ` ` ') + ' `\n'
alias = ' '
if(command.aliases.length >= 1){
for(const al of command.aliases) alias += pill(al)
alias += "\n"
}
let page = createEmbed("default", context, {
description: `${icon("command")} **\` ${command.name} \`**\n${alias}\n${command.metadata.description}`,
description: `${icon("command")} ${pill(command.name)}\n${alias}\n${command.metadata.description}`,
fields: []
})