fix /? slash

This commit is contained in:
LenAnderson
2024-04-11 14:31:09 -04:00
parent 0dcd9ed77a
commit 448b812faa
2 changed files with 18 additions and 3 deletions

View File

@ -154,9 +154,11 @@ export class SlashCommandParser {
getHelpString() {
const listItems = Object
.entries(this.helpStrings)
.sort((a, b) => a[0].localeCompare(b[0]))
.map(x => x[1])
.keys(this.commands)
.filter(key=>this.commands[key].name == key)
.map(key=>this.commands[key])
.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()))
.map(x => x.helpStringFormatted)
.map(x => `<li>${x}</li>`)
.join('\n');
return `<p>Slash commands:</p><ol>${listItems}</ol>