mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix /? slash
This commit is contained in:
@ -5,4 +5,17 @@ export class SlashCommand {
|
||||
/**@type {Boolean}*/ interruptsGeneration;
|
||||
/**@type {Boolean}*/ purgeFromMessage;
|
||||
/**@type {String[]}*/ aliases;
|
||||
|
||||
get helpStringFormatted() {
|
||||
let aliases = '';
|
||||
if (this.aliases?.length > 0) {
|
||||
aliases = ' (alias: ';
|
||||
aliases += this.aliases
|
||||
.map(it=>`<span class="monospace">/${it}</span>`)
|
||||
.join(', ')
|
||||
;
|
||||
aliases += ')';
|
||||
}
|
||||
return `<span class="monospace">/${this.name}</span>${this.helpString}${aliases}`;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user