Refactor /if to fromProps

a1af768b02e467403432bb69da86470071515a5a

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +13 -6Showing whitespace changes
public/scripts/variables.js+13 -6
@@ -1274,8 +1274,12 @@ export function registerVariableCommands() {
12741274 enumProvider: commonEnumProviders.variables('all'),
12751275 forceEnum: false,
12761276 }),
12771277 new SlashCommandNamedArgument.fromProps({
1278- 'rule', 'comparison rule', [ARGUMENT_TYPE.STRING], true, false, null, [
1278+ name: 'rule',
1279+ description: 'comparison rule',
1280+ typeList: [ARGUMENT_TYPE.STRING],
1281+ isRequired: true,
1282+ enumList: [
12791283 new SlashCommandEnumValue('gt', 'a > b'),
12801284 new SlashCommandEnumValue('gte', 'a >= b'),
12811285 new SlashCommandEnumValue('lt', 'a < b'),
@@ -1286,10 +1290,13 @@ export function registerVariableCommands() {
12861290 new SlashCommandEnumValue('in', 'a includes b'),
12871291 new SlashCommandEnumValue('nin', 'a not includes b'),
12881292 ],
12891293 }),
12901294 new SlashCommandNamedArgument.fromProps({
1291- 'else', 'command to execute if not true', [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND], false,
1295+ name: 'else',
1292- ),
1296+ description: 'command to execute if not true',
1297+ typeList: [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND],
1298+ isRequired: false,
1299+ }),
12931300 ],
12941301 unnamedArgumentList: [
12951302 new SlashCommandArgument(