Fix command aliases

This commit is contained in:
Cohee
2023-11-26 15:47:11 +02:00
parent 19f758a0fb
commit 3bc91f10ec
2 changed files with 5 additions and 5 deletions

View File

@ -341,7 +341,7 @@ function deleteGlobalVariable(name) {
}
export function registerVariableCommands() {
registerSlashCommand('listvar', listVariablesCallback, [''], ' list registered chat variables', true, true);
registerSlashCommand('listvar', listVariablesCallback, [], ' list registered chat variables', true, true);
registerSlashCommand('setvar', (args, value) => setLocalVariable(args.key || args.name, value), [], '<span class="monospace">key=varname (value)</span> set a local variable value and pass it down the pipe, e.g. <tt>/setvar key=color green</tt>', true, true);
registerSlashCommand('getvar', (_, value) => getLocalVariable(value), [], '<span class="monospace">(key)</span> get a local variable value and pass it down the pipe, e.g. <tt>/getvar height</tt>', true, true);
registerSlashCommand('addvar', (args, value) => addLocalVariable(args.key || args.name, value), [], '<span class="monospace">key=varname (increment)</span> add a value to a local variable and pass the result down the pipe, e.g. <tt>/addvar score 10</tt>', true, true);