add "chatvar" aliases and "length" alias

455f9b7a3e9f06fb4b3f88dad5ce6af8451aa04e

Succubyss <87207237+Succubyss@users.noreply.github.com>

1 files changed, +8 -0Ignore whitespace
public/scripts/variables.js+8 -0
@@ -859,11 +859,13 @@ export function registerVariableCommands() {
859859 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
860860 name: 'listvar',
861861 callback: listVariablesCallback,
862+ aliases: ['listchatvar'],
862863 helpString: 'List registered chat variables.',
863864 }));
864865 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
865866 name: 'setvar',
866867 callback: (args, value) => String(setLocalVariable(args.key || args.name, value, args)),
868+ aliases: ['setchatvar'],
867869 returns: 'the set variable value',
868870 namedArgumentList: [
869871 SlashCommandNamedArgument.fromProps({
@@ -900,6 +902,7 @@ export function registerVariableCommands() {
900902 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
901903 name: 'getvar',
902904 callback: (args, value) => String(getLocalVariable(value, args)),
905+ aliases: ['getchatvar'],
903906 returns: 'the variable value',
904907 namedArgumentList: [
905908 SlashCommandNamedArgument.fromProps({
@@ -943,6 +946,7 @@ export function registerVariableCommands() {
943946 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
944947 name: 'addvar',
945948 callback: (args, value) => String(addLocalVariable(args.key || args.name, value)),
949+ aliases: ['addchatvar'],
946950 returns: 'the new variable value',
947951 namedArgumentList: [
948952 SlashCommandNamedArgument.fromProps({
@@ -1087,6 +1091,7 @@ export function registerVariableCommands() {
10871091 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
10881092 name: 'incvar',
10891093 callback: (_, value) => String(incrementLocalVariable(value)),
1094+ aliases: ['incchatvar'],
10901095 returns: 'the new variable value',
10911096 unnamedArgumentList: [
10921097 SlashCommandNamedArgument.fromProps({
@@ -1115,6 +1120,7 @@ export function registerVariableCommands() {
11151120 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
11161121 name: 'decvar',
11171122 callback: (_, value) => String(decrementLocalVariable(value)),
1123+ aliases: ['decchatvar'],
11181124 returns: 'the new variable value',
11191125 unnamedArgumentList: [
11201126 SlashCommandNamedArgument.fromProps({
@@ -1401,6 +1407,7 @@ export function registerVariableCommands() {
14011407 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
14021408 name: 'flushvar',
14031409 callback: async (_, value) => deleteLocalVariable(value instanceof SlashCommandClosure ? (await value.execute())?.pipe : String(value)),
1410+ aliases: ['flushchatvar'],
14041411 unnamedArgumentList: [
14051412 SlashCommandNamedArgument.fromProps({
14061413 name: 'key',
@@ -1870,6 +1877,7 @@ export function registerVariableCommands() {
18701877 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
18711878 name: 'len',
18721879 callback: (_, value) => String(lenValuesCallback(value)),
1880+ aliases: ['length'],
18731881 returns: 'length of the provided value',
18741882 unnamedArgumentList: [
18751883 SlashCommandArgument.fromProps({