mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-01 22:55:24 +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' +
|
? '\n<b>Custom commands:</b>\n' +
|
||||||
customCommands
|
customCommands
|
||||||
.filter(command => command.isActive)
|
.filter(command => command.isActive)
|
||||||
.sort((a, b) => a.role < b.role)
|
.sort((a, b) => a.role.toLowerCase() < b.role.toLowerCase())
|
||||||
.map(command => `[${command.role}] <code>!${command.name}</code>`)
|
.map(command =>
|
||||||
|
`[${command.role.toLowerCase()}] ` +
|
||||||
|
`<code>!${command.name}</code>`)
|
||||||
.join('\n')
|
.join('\n')
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
return replyWithHTML(commandReference + customCommandsText + actions);
|
return replyWithHTML(commandReference + customCommandsText + actions);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user