diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index 6706d6692..a1e83a4c2 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -1267,21 +1267,41 @@ export function initDefaultSlashCommands() { callback: popupCallback, returns: 'popup text', namedArgumentList: [ - new SlashCommandNamedArgument( - 'large', 'show large popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(), - ), - new SlashCommandNamedArgument( - 'wide', 'show wide popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(), - ), - new SlashCommandNamedArgument( - 'wider', 'show wider popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(), - ), - new SlashCommandNamedArgument( - 'transparent', 'show transparent popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(), - ), - new SlashCommandNamedArgument( - 'okButton', 'text for the OK button', [ARGUMENT_TYPE.STRING], false, - ), + SlashCommandNamedArgument.fromProps({ + name: 'large', + description: 'show large popup', + typeList: [ARGUMENT_TYPE.BOOLEAN], + enumList: commonEnumProviders.boolean('onOff')(), + }), + SlashCommandNamedArgument.fromProps({ + name: 'wide', + description: 'show wide popup', + typeList: [ARGUMENT_TYPE.BOOLEAN], + enumList: commonEnumProviders.boolean('onOff')(), + }), + SlashCommandNamedArgument.fromProps({ + name: 'wider', + description: 'show wider popup', + typeList: [ARGUMENT_TYPE.BOOLEAN], + enumList: commonEnumProviders.boolean('onOff')(), + }), + SlashCommandNamedArgument.fromProps({ + name: 'transparent', + description: 'show transparent popup', + typeList: [ARGUMENT_TYPE.BOOLEAN], + enumList: commonEnumProviders.boolean('onOff')(), + }), + SlashCommandNamedArgument.fromProps({ + name: 'okButton', + description: 'text for the OK button', + typeList: [ARGUMENT_TYPE.STRING], + defaultValue: 'OK', + }), + SlashCommandNamedArgument.fromProps({ + name: 'cancelButton', + description: 'text for the Cancel button', + typeList: [ARGUMENT_TYPE.STRING], + }), ], unnamedArgumentList: [ new SlashCommandArgument( @@ -1297,7 +1317,7 @@ export function initDefaultSlashCommands() { Example:
/popup large=on wide=on okButton="Submit" Enter some text:
+ /popup large=on wide=on okButton="Confirm" Please confirm this action.