The user sending the command:
${user.id}
- The user id${user.name}
- The username of the user${user.displayName}
- The display name of the user${user}
- Shortcut for the display name${user.pronouns(They)}
,${user.pronouns(themselves)}
,${user.pronouns(is are)}
,${user.pronouns(s)}
- The pronoun of the user or in the case ofis are
it choosesis
if the pronoun is singular orare
if the pronoun is plural, ors
printss
only if the pronoun is singular${user.game}
- The game the user was last streaming${user.link}
- The link to their channel
${broadcaster}
- The broadcaster, can be used with${broadcaster.game}
etc.${target}
- The target user of the first argument of the command, can be used with${target.id}
etc.${0}
- The name of the command (0th argument)${1}
- The first argument${-1}
- The last argument${-2}
- The 2nd to last argument${1:}
- All arguments except the command name${1:2}
- The first two arguments${-4:-2}
- The 2nd to last, 3rd last and 4th last arguments${<name>}
- The capture group from a regex command, for example${<var>}
will print the capture group namedvar
.
Hint: use ${assert(3)}
to run the command only if there are 3 arguments.
Can be used to make a response appear only if a certain condition is met.
For example ${assert(target)}
will only respond if there is an argument for the command and the argument is a valid user.
Can be negated with ${assert(!x)}
.
With ${if(x 'i')}
you can print i
only if x
is present/true and with ${if(x 'i' 'e')}
it prints i
if the condition x
is met, but otherwise prints e
.
For example ${if(target.game '${target.pronouns(They)} ${target.pronouns(was were)} last playing ${target.game}.' 'It is not known what game ${target.pronouns(they) last played!'})}
would print She was last playing Super Mario Maker 2.
if the target user goes by she/her and was last playing Super Mario Maker 2, but if they go by they/them and don't have any game set then this will print It is not know what game they last played!
.
${time}
,${time(zoneid)}
- Prints the time,zoneid
can be used to set the timezone${random(a b)}
- Picks a random number betweena
andb
(both inclusive)${random('a')}
,${random('a' 'b')}
, etc. - Prints a random option.${random(x%'a' y%'b' 'c')}
etc. - Usesx
as a percentage to picka
,y
as a percentage to pickb
, andc
is the rest percentage. For example:${random(5%'meow' 20%'mewo' 'uwu')}
. Note if you use a percent for each option then it will be weighted by the total, if the last option does not have a percent the total weight will be100
.
A text will be replaced with the following rules:
${
x}
will be replaced by evaluting x (x is an expression).\$
will be replaced by$
.\'
will be replaced by'
(only if surrounded by'
in an expression).\"
will be replaced by"
(only if surrounded by"
in an expression).\\
will be replaced by\
.- Every other text stays as is.
An expression is one of the following:
- A function with 0 arguments which is just an identifier will be replaced by evaluating the function (this is used for variables as well which are functions with 0 arguments)
- A function with 1 or more arguments which is an identifier +
(
+ arguments +)
will be replaced by evaluating its arguments and then evaluating the function passing the arguments - A capure group which is
<
+ identifier +>
which will be replaced by the value of the capture group in the regex - A number followed by
:
and another number wich will be replaced by the argument range - A number n which will be replaced by the nth argument
- An expression followed by
.
follwed by a method which will be replaced by evaluating the expression on the left and calling the method with that argument !
followed by an expression will turn the evalutation of the expression fromnull
totrue
,false
totrue
,true
tofalse
, a user tofalse
, the empty string""
totrue
, any other string tofalse
.'
+ text +'
or"
+ text +"
will be evaluated as text.- A number followed by
%
then followed by an expression will return an object with the propertieschance
set to the number,value
to the evaluation of the expression and atoString()
method to print the value.
Are alphanumeric words.
A string
will be printed as is. A number
will be printed as the number. null
, true
, false
will be printed as the empty string ""
. An object
will use the toString()
method to be printed. (User objects will print the display name by default)
user
- The user using the commandbroadcaster
- The broadcastertarget
- The user of the first argument of the commandassert(
a:expression)
- Evaluates!!
+ a and if the value isfalse
does not print a command response.if(
a:expression space b:expression)
- Evaluates!!
+ a and will be replaced by evaluating b if!!
+ a istrue
, otherwise will be replaced by the empty string""
.if(
a:expression space b:expression space c:expression)
- Evaluates!!
+ a and will be replaced by evaluating b if!!
+ a istrue
, otherwise will be replaced by evaluating c.