add "chatvar" aliases and "length" alias
| @@ -859,11 +859,13 @@ export function registerVariableCommands() { | ||
| 859 | 859 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 860 | 860 | name: 'listvar', |
| 861 | 861 | callback: listVariablesCallback, |
| 862 | + aliases: ['listchatvar'], | |
| 862 | 863 | helpString: 'List registered chat variables.', |
| 863 | 864 | })); |
| 864 | 865 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 865 | 866 | name: 'setvar', |
| 866 | 867 | callback: (args, value) => String(setLocalVariable(args.key || args.name, value, args)), |
| 868 | + aliases: ['setchatvar'], | |
| 867 | 869 | returns: 'the set variable value', |
| 868 | 870 | namedArgumentList: [ |
| 869 | 871 | SlashCommandNamedArgument.fromProps({ |
| @@ -900,6 +902,7 @@ export function registerVariableCommands() { | ||
| 900 | 902 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 901 | 903 | name: 'getvar', |
| 902 | 904 | callback: (args, value) => String(getLocalVariable(value, args)), |
| 905 | + aliases: ['getchatvar'], | |
| 903 | 906 | returns: 'the variable value', |
| 904 | 907 | namedArgumentList: [ |
| 905 | 908 | SlashCommandNamedArgument.fromProps({ |
| @@ -943,6 +946,7 @@ export function registerVariableCommands() { | ||
| 943 | 946 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 944 | 947 | name: 'addvar', |
| 945 | 948 | callback: (args, value) => String(addLocalVariable(args.key || args.name, value)), |
| 949 | + aliases: ['addchatvar'], | |
| 946 | 950 | returns: 'the new variable value', |
| 947 | 951 | namedArgumentList: [ |
| 948 | 952 | SlashCommandNamedArgument.fromProps({ |
| @@ -1087,6 +1091,7 @@ export function registerVariableCommands() { | ||
| 1087 | 1091 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 1088 | 1092 | name: 'incvar', |
| 1089 | 1093 | callback: (_, value) => String(incrementLocalVariable(value)), |
| 1094 | + aliases: ['incchatvar'], | |
| 1090 | 1095 | returns: 'the new variable value', |
| 1091 | 1096 | unnamedArgumentList: [ |
| 1092 | 1097 | SlashCommandNamedArgument.fromProps({ |
| @@ -1115,6 +1120,7 @@ export function registerVariableCommands() { | ||
| 1115 | 1120 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 1116 | 1121 | name: 'decvar', |
| 1117 | 1122 | callback: (_, value) => String(decrementLocalVariable(value)), |
| 1123 | + aliases: ['decchatvar'], | |
| 1118 | 1124 | returns: 'the new variable value', |
| 1119 | 1125 | unnamedArgumentList: [ |
| 1120 | 1126 | SlashCommandNamedArgument.fromProps({ |
| @@ -1401,6 +1407,7 @@ export function registerVariableCommands() { | ||
| 1401 | 1407 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 1402 | 1408 | name: 'flushvar', |
| 1403 | 1409 | callback: async (_, value) => deleteLocalVariable(value instanceof SlashCommandClosure ? (await value.execute())?.pipe : String(value)), |
| 1410 | + aliases: ['flushchatvar'], | |
| 1404 | 1411 | unnamedArgumentList: [ |
| 1405 | 1412 | SlashCommandNamedArgument.fromProps({ |
| 1406 | 1413 | name: 'key', |
| @@ -1870,6 +1877,7 @@ export function registerVariableCommands() { | ||
| 1870 | 1877 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 1871 | 1878 | name: 'len', |
| 1872 | 1879 | callback: (_, value) => String(lenValuesCallback(value)), |
| 1880 | + aliases: ['length'], | |
| 1873 | 1881 | returns: 'length of the provided value', |
| 1874 | 1882 | unnamedArgumentList: [ |
| 1875 | 1883 | SlashCommandArgument.fromProps({ |