The Chat bot is one of the most interacted-with feature among our tools, both by creators and viewers. Mainly chat commands the viewers run and the creator can manage, put to use through modules, custom commands, timers and even spam filters, to allow a wide variety of engagement options and enforcement.
We will go over the Chat Commands section of the dashboard to make sure you understand how to put the bot to use. We will also discuss some User Management features that go along with chat commands and more aspects of the Chat Bot. Any examples shared here will show the custom bot name feature in-use, which you can review here.
The Chat Commands page is divided into several sections - Default Commands, Custom Commands, Command Variables and Bot Language.
Default CommandsThis tab shows all the default commands available "out of the box" with the StreamElements chat bot. The table contains several columns:
- Enabled: An indication of whether or not the command is enabled
- Command: The command name
- Description: A description of the command
- Module: Which bot module the default command is related to
- Cost: If it has a price (loyalty points)
- Edit: Expands the command's settings
In addition, the commands are grouped based on the required user level to run it. The are the available user levels:
100 - Viewer
250 - Subscriber (Viewers that subscribed to your Twitch channel are automatically placed at this level)
300 - Regular
500 - Moderator (Mods that were assigned via your Twitch Creator Dashboard are automatically placed at this level)
1000 - Super Moderator (StreamElements Chat Bot feature)
1500 - Broadcaster (Automatically assigned to the channel owner)
If you want to see a user's level, you can use !level Username
NOTE: In the User Management section of the Bot features you should automatically see all your mods and VIPs in the list. You can add users to be Super Moderators or Regulars and create custom commands (see below) or edit a default command's requires user-level, to allow only their user level (and above) to run them.
Your account as the Broadcaster should not appear in the User Management page.
In some cases, like a name change on Twitch, the bot might have some out-of-date information. We suggest to first of all part the bot from your dashboard > logout of StreamElements at https://streamelements.com/logout > log in again > re-invite the bot > mod it by typing /mod StreamElements in your Twitch chat and make sure it's not muted or banned (Unmute can be done from the Dashboard if the bot is muted, and unbanning can be confirmed by typing /unban StreamElements in your chat).
If you still see your previous name in the User Management page, use the !level command to change the previous name's entry to 'Regular' - !level OldUsername 100. Then refresh the User Management window and check if it's still there. If it is, reach out to us and we'll assist with it!
You can also assign Dashboard Managers for your account. Here are the access Levels (least to most access): Bot Supervisor (allows adding Super Moderators from the Dashboard), Editor, Full Access.You can invite others by navigating to your account settings page:
Choose the access level you wish to grant the user, generate the link and send it to them. It's important to know that while you're roleplaying as someone that granted you access to their account, others will not be able to roleplay as you. You will need to stop roleplaying and have them try again (and both of you can logout of StreamElements at https://streamelements.com/logout and login again if that didn't help).
Custom Commands
You can add, remove and make changes to custom commands in chat with !command and its flags:
- !command add (commandname) (commandresponse) - allows you to add a new custom command
- !command remove (commandname) - allows you to delete a custom command
- !command edit (commandname) (commandresponse) - allows you to edit an existing custom command
- !command show (commandname) - allows you to see the raw response of a command before variables are used
- !command options (commandname) -(flag) - allows you to change settings for an existing custom command
- !command alias basecommand - Shows the alias commands for !basecommand
- !command alias add basecommand aliascommand1 aliascommand2 - Adds alias commands !aliascommand1 and !aliascommand2 for command !basecommand
- !command alias remove basecommand aliascommand1 - Removes alias command !aliascommand1 from command !basecommand
- Valid flags for !cmd options include: -enable -disable -cd (number in seconds) -usercd (number in seconds) -cost (number) -level (number) -type (say, whisper or reply), count (number)
- Syntax example: !cmd options twitter -usercd 60 -type reply -level 250
Some options (like keywords for example) can only be added to commands via the Dashboard. The Custom Commands table is slightly different than the default commands table, and each custom command has an 'Advanced' section to its settings, to allow customization -- Enabled: An indication of whether or not the command is enabled
- Command: The command name
- Response: The desired bot response when the command is triggered (accepts Variables, see below)
- Global Cooldown: A global cooldown for the command after it was used
- User Cooldown: A specific cooldown for the user running the command
- Cost: If it has a price (loyalty points)
- Access Level: Minimum required user level to run the command
- Delete: Allows deletion of a custom command
- Edit: Expands the command's settings
What custom commands can we create?
You can create all sorts of commands, such as !time or !about -
This command's settings will look like this -
You can see that you can decide when the command is enabled and if it's shown in the public commands page (accessible via the default command !commands). You can decide if the bot replies with a mention, just posts the response in chat without mentioning the user or send the response as a whisper. You can set the command's cost, cooldowns, aliases, keywords and regexes.
Aliases - Aliases are alternatives to the command !hi can also work with !hello if !hello is added as !hi's alias
Keywords - A word or a phrase that will trigger the command without having to run it traditionally (with the exclamation point, for example !about can automatically be triggered if it has keywords like 'from' or 'where are you from' when a user posts either in chat).
Regexes - Getting familiar with Regular Expressions can be a bit challenging at the beginning. We recommend researching the subject online to better understand the basis of utilizing regexes in your commands.
Examples for each:
Aliases -In this screenshot (default command), it quite literally means that !ticket = !enter.
Keywords -This command's response will be triggered when one of the entered keywords is detected in chat.
Regexes -
The following command has a variety of triggers based on the used regex (limited to 100 characters). It's meant to greet users automatically after they send a general 'hi' in chat when they join stream -
This is the regex. This syntax means that only if one of these words is posted in chat by itself (without anything before the word or after it) the response will be triggered
^(\Ahi\z|\Ahola\z|\Ahey\z|\Ahello\z|\Ahallu\z|\Aoi\z|\Asup\z|\Awhatsup\z|\Agreetings\z|\Ahai\z)
Meaning of the flags -
^ = Must be posted at the beginning of a line
() = Meant to be used when your phrase has more than one flag
\A = Start of word
\z = End of word
| = Word separator
The actual words that will trigger the response:
hi, hola, hey, hello, hallu, oi, sup, whatsup, greetings, hai
This command's main Settings page leads us to the next feature -
Command VariablesThis is a simplified syntax of this command:
$(random.pick 'option1''option2''option3''option4')
This response means that every time the command is triggered, the response will be random based on the entered text (the options from above).
$(random.pick) is the variable and the options are its arguments, separate by apostrophes as shown above (no space between them needed).
And this is how it looks in chat -
You can navigate to the Command Variables page to see all available variables you can put to use in bot responses. Even though everything is pretty much explained in that page, another example of using variables can be shared -
A hug command!This is response: ${sender} hugs ${1|${random.chatter}}
Variables used: ${sender}, ${1}, ${random.chatter}
That response means that the viewer using the command (${sender}) hugs either a tagged chatter (${1}) or a random chatter (${random.chatter}). The pipe (|) allows us to use either one of the variables - if no user is tagged, a random chatter will be hugged and if a user is tagged the random chatter variable won't be used (note the correct syntax when using the pipe for more than one option ${1|${random.chatter}}) -
We've pretty much covered the concept of commands! More interaction with commands involves posting timed messages with the bot by using its timers, monitoring and removing unwanted communication in chat by utilizing the bots spam filters and having chat engagement with mini games.
Before we go over those, it's worth mentioning the Quotes system -
!quote is a default command that currently has no UI for management.
Any viewer can use !quote or !quote # in order to post a random/specific quote in chat. Adding/removing quotes with the !quote add/remove arguments is permitted to user levels "Moderator" and above.
There is no option to edit quotes, so if a specific quote needs to be edited, you're able to remove it with !quote remove # and re-add it with !quote add QUOTE.
The quote number will be assigned based on previous quotes already added. So if 2 quotes were already added, the next one will be #3.
Usage -
!quote add XYZ - Adds a quote
!quote remove # [number] - Removes a quote
!quote # - Shows a specific quote
!quote - Shows a random quote
You can make a custom command and set the response to be -
${quote ${random.1-10}}. This will return a random quote from 1 to 10 (these should be added first) and you can group them that way to run a custom command that will show a random quote from that group (group of 10 quotes).
Additional Chat Bot Features
- You can read about Modules here
- And review an explanation about Timers here
Spam Filters
As mentioned, we can also have the bot remove messages from chat and timeout or ban the users that post them, for spam or message based limitation you wish to enforce in your chat.
In your Spam Filters page you will see this -
The slider allows you to use a preset of settings detailed under Protection Level Details (click that tooltip).
You can expand each protection type to modify its settings -
Most protection types have similar settings. Go over them and edit them as you wish.
Several notes regarding some of the settings:
- Regarding the values of timeouts -
1 Or above = Timeout
0 = Delete the message
-1 = Ban the user
- You can add Custom Messages when banning \ timing out
- For Link Protection, you can whitelist links using wildcards, for example Twitch clips, by entering a URL to the Whitelist tab in the protection settings -
https://twitch.tv/ChannelNAME/*
- You can create a Banned Words group to ban for spam or profanity -
The Loyalty system also utilizes commands.
Hopefully, by now, you have a better understanding of how to create the commands you want and put the bot to use the way you wish your viewers to interact with it, with you and among themselves! This article also showcases some additional features and overview for receiving support!
Lastly, please feel free to refer to the following set of articles for great information on the getting started process with StreamElements. We also recommend going over the Quick Start guide if you don't have time to follow the Onboarding articles.