fix alias list in help string

This commit is contained in:
LenAnderson
2024-04-07 16:50:04 -04:00
parent 16e8037e7f
commit d1682350e3
3 changed files with 20 additions and 19 deletions

View File

@ -2,8 +2,6 @@ export class SlashCommand {
/**@type {String}*/ name;
/**@type {Function}*/ callback;
/**@type {String}*/ helpString;
/**@type {String}*/ helpStringFormatted;
/**@type {String}*/ helpStringFormattedWithoutName;
/**@type {Boolean}*/ interruptsGeneration;
/**@type {Boolean}*/ purgeFromMessage;
/**@type {String[]}*/ aliases;

View File

@ -150,16 +150,6 @@ export class SlashCommandParser {
this.commands[alias] = fnObj;
});
}
let stringBuilder = `${helpString} `;
if (Array.isArray(aliases) && aliases.length) {
let aliasesString = `(alias: ${aliases.map(x => `<span class="monospace">/${x}</span>`).join(', ')})`;
stringBuilder += aliasesString;
}
fnObj.helpStringFormattedWithoutName = stringBuilder;
stringBuilder = `<span class="monospace">/${command}</span> ${stringBuilder}`;
this.helpStrings[command] = stringBuilder;
fnObj.helpStringFormatted = stringBuilder;
}
getHelpString() {