From 2c787f23c7d1a6ffd18d8d6f0901174218bc5ee0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:53:41 +0300 Subject: [PATCH] Fix named argument. --- public/scripts/slash-commands.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index a1ba74f33..0917297db 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -326,18 +326,18 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ })); SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'rename-char', - /** @param {{silent: string, renameChats: string}} options @param {string} name */ - callback: async ({ silent = 'true', renameChats = null }, name) => { - const renamed = await renameCharacter(name, { silent: isTrueBoolean(silent), renameChats: renameChats !== null ? isTrueBoolean(renameChats) : null }); + /** @param {{silent: string, chats: string}} options @param {string} name */ + callback: async ({ silent = 'true', chats = null }, name) => { + const renamed = await renameCharacter(name, { silent: isTrueBoolean(silent), renameChats: chats !== null ? isTrueBoolean(chats) : null }); return String(renamed); }, returns: 'true/false - Whether the rename was successful', namedArgumentList: [ new SlashCommandNamedArgument( - 'silent', 'Hide any blocking popups. (if false, the name is optional. If not supplied, a popup asking for it will appear)', [ARGUMENT_TYPE.BOOLEAN], false, false, 'true' + 'silent', 'Hide any blocking popups. (if false, the name is optional. If not supplied, a popup asking for it will appear)', [ARGUMENT_TYPE.BOOLEAN], false, false, 'true', ), new SlashCommandNamedArgument( - 'chats', 'Rename char in all previous chats', [ARGUMENT_TYPE.BOOLEAN], false, false, '' + 'chats', 'Rename char in all previous chats', [ARGUMENT_TYPE.BOOLEAN], false, false, '', ), ], unnamedArgumentList: [ @@ -345,7 +345,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ 'new char name', [ARGUMENT_TYPE.STRING], true, ), ], - helpString: 'Renames the current character.' + helpString: 'Renames the current character.', })); SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'sysgen',