registerSlashCommand('setvar',(args,value)=>setLocalVariable(args.key||args.name,value),[],'<span class="monospace">key=varname (value)</span> – set a local variable value and pass it down the pipe, e.g. <tt>/setvar key=color green</tt>',true,true);
registerSlashCommand('getvar',(_,value)=>getLocalVariable(value),[],'<span class="monospace">(key)</span> – get a local variable value and pass it down the pipe, e.g. <tt>/getvar height</tt>',true,true);
registerSlashCommand('addvar',(args,value)=>addLocalVariable(args.key||args.name,value),[],'<span class="monospace">key=varname (increment)</span> – add a value to a local variable and pass the result down the pipe, e.g. <tt>/addvar score 10</tt>',true,true);
registerSlashCommand('setglobalvar',(args,value)=>setGlobalVariable(args.key||args.name,value),[],'<span class="monospace">key=varname (value)</span> – set a global variable value and pass it down the pipe, e.g. <tt>/setglobalvar key=color green</tt>',true,true);
registerSlashCommand('getglobalvar',(_,value)=>getGlobalVariable(value),[],'<span class="monospace">(key)</span> – get a global variable value and pass it down the pipe, e.g. <tt>/getglobalvar height</tt>',true,true);
registerSlashCommand('addglobalvar',(args,value)=>addGlobalVariable(args.key||args.name,value),[],'<span class="monospace">key=varname (increment)</span> – add a value to a global variable and pass the result down the pipe, e.g. <tt>/addglobalvar score 10</tt>',true,true);
registerSlashCommand('if',ifCallback,[],'<span class="monospace">a=varname1 b=varname2 rule=comparison "(command)"</span> – compare the value of variable "a" with the value of variable "b", and if the condition yields true, then execute any valid slash command enclosed in quotes and pass the result of the command execution down the pipe. Numeric values for "a" and "b" supported. Available rules: gt => a > b, gte => a >= b, lt => a < b, lte => a <= b, eq => a == b e.g. <tt>/if a=score a=10 rule=gte "/speak You win"</tt> triggers a /speak command if the value of "score" is greater or equals 10.',true,true);