In your created commands you can refer to any built-in variable using this syntax
${variable:param1=value,param2='longer value' ; param3 = "another longer value", paramwithoutvalue}
for maximum configuration or just
${variable}
for a simple usage.
For details please see each built-in variable
Parameters for built-in variables can be separated either using colon or semicolon. Spaces between parameters and equal signs are ignored (as seen in the example).
Usage:
${time} | ${time:format=timeformat,zone=timezone}
Returns the current time either using default format "HH:mm:ss" and default zone "UTC" if format and zone parameters are not specified
You can also use built-in variable ${time:format=timeformat,zone=timezone}to format the current time. The format parameter should be a valid date format string (e.g. "HH:mm:ss", "YYYY-MM-DD", etc.). The timezone parameter should be a valid timezone string (e.g. "UTC", "Europe/Prague", etc.).
Usage:
${chatters} | ${chatters:separator=sep}
Returns a list of chatters specified before a command call. Optionally a separator can be configured. By default this is one space character.
Example of response for command !somecommand with the response "${chatters:separator=' and '}" for the user input "@user1 @user2 @user3 !somecommand parameters":
@user1 @user2 @user3
Usage:
${sender} | ${sender:notag}
Returns the display name of the user who called the command. Parameter notag can be specified with either no value or any value so that the response doesn't contain the '@' letter.
Usage:
${random} | ${random:from=numberfrom;to=numberto
Returns a random number between from to to parameters (including both numbers). The default is 0 for the from parameter and 100 for the to parameter.
You can use the built-in command !command to create, edit or delete a command. For detailed usage please see subchapters. Here's the full usage:
!commands (add/create|edit/update/change|remove/delete) ([!]command) [response]
To create a simple command on Twitch use the built-in command !command with the add or create parameter. The command must not exist yet. If it already exists, an error message is replied. Here are some examples:
!commands add !from France
This will create a command "!from" with a response "France".
!commands create time It is ${time}
This will create a command "!time" with a response "It is [evaluated value of built-in variable time]".
To edit a simple command on Twitch use the built-in command !command with the edit, update or change parameter. The command must already exist. If it doesn't, an error message is replied. Here is an example that changes the command "!from" so it will newly respond with "Austria":
!commands update !from Austria
To delete a command, use the built-in command !command with the delete or remove parameter. The command must already exist. If it doesn't, an error message is replied. Here is an example that deletes the command "!time":
!commands delete !time