mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
remove name from unnamed arg
This commit is contained in:
@ -55,7 +55,7 @@ export class SlashCommandNamedArgument extends SlashCommandArgument {
|
|||||||
* @param {string|string[]} enums
|
* @param {string|string[]} enums
|
||||||
*/
|
*/
|
||||||
constructor(name, description, types, isRequired = false, acceptsMultiple = false, defaultValue = null, enums = [], aliases = []) {
|
constructor(name, description, types, isRequired = false, acceptsMultiple = false, defaultValue = null, enums = [], aliases = []) {
|
||||||
super(name, description, types, isRequired, acceptsMultiple, defaultValue, enums);
|
super(description, types, isRequired, acceptsMultiple, defaultValue, enums);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.aliasList = aliases ? Array.isArray(aliases) ? aliases : [aliases] : [];
|
this.aliasList = aliases ? Array.isArray(aliases) ? aliases : [aliases] : [];
|
||||||
}
|
}
|
||||||
|
@ -773,7 +773,7 @@ export function registerVariableCommands() {
|
|||||||
'else', 'command to execute if not true', [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND], false,
|
'else', 'command to execute if not true', [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND], false,
|
||||||
));
|
));
|
||||||
ifCmd.unnamedArgumentList.push(new SlashCommandArgument(
|
ifCmd.unnamedArgumentList.push(new SlashCommandArgument(
|
||||||
'then', 'command to execute if true', [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND], true,
|
'command to execute if true', [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND], true,
|
||||||
));
|
));
|
||||||
ifCmd.returns = 'result of the executed command ("then" or "else")';
|
ifCmd.returns = 'result of the executed command ("then" or "else")';
|
||||||
ifCmd.helpString = `
|
ifCmd.helpString = `
|
||||||
|
Reference in New Issue
Block a user