mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 06:05:22 +00:00
sort and show all custom command roles in lowercase
This commit is contained in:
@@ -36,11 +36,12 @@ const commandReferenceHandler = async ({ chat, replyWithHTML }) => {
|
||||
? '\n<b>Custom commands:</b>\n' +
|
||||
customCommands
|
||||
.filter(command => command.isActive)
|
||||
.sort((a, b) => a.role < b.role)
|
||||
.map(command => `[${command.role}] <code>!${command.name}</code>`)
|
||||
.sort((a, b) => a.role.toLowerCase() < b.role.toLowerCase())
|
||||
.map(command =>
|
||||
`[${command.role.toLowerCase()}] ` +
|
||||
`<code>!${command.name}</code>`)
|
||||
.join('\n')
|
||||
: '';
|
||||
|
||||
return replyWithHTML(commandReference + customCommandsText + actions);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user