Guide 02

Commands & variables

Commands that greet people by name, roll dice, and count your wins. No code: just braces.

01The anatomy of a command

at a glance Two required fields, five optional dials. Learn them once, reuse them forever.

A custom command is a question your viewers can ask (!hug) and the answer your bot gives. The editor has seven fields; only Name and Response are required.

  • Name: what viewers type after the “!”. Lowercase, one word.
  • Alternate names: extra triggers for the same command (!hug and !cuddle can be one command).
  • Response: what the bot says. Up to 5 lines; every line is its own chat message.
  • The chat rehearsal acts your response out with sample values before you save. The command builder has the same one.
  • Access and cooldown: who can use it, and how many quiet seconds follow each use.
  • Only while live parks the command when the stream is offline; Active is the on/off switch.
The command editor as it docks beside your list, every field annotated.

02Two ways to create one

at a glance The dashboard editor, or a one-line chat message. Both land in the same place.

From the dashboard

CommandsNew command → fill in name and response → Create. It usually answers in chat within seconds. Edits work the same way: click any command row, change it, save.

From chat, with !cmd

You and your moderators can also manage commands without leaving chat, mid-stream:

!cmd add, edit and remove are for the broadcaster and moderators.
  • !cmd add <name> <response> creates a command.
  • !cmd edit <name> <response> replaces its response.
  • !cmd remove <name> deletes it.

Tip Chat is fast for quick one-liners; the dashboard shows the extra dials (access, cooldown, aliases) and a live preview. Use whichever is closer to your hands.

03Variables: the smart parts

at a glance Curly braces are placeholders. The bot fills them in at the moment it replies.

Write {user} in a response, and the bot swaps it for the name of whoever ran the command. That single idea powers everything below. These are the people-and-place variables every custom command understands:

VariableBecomesExample
{user}The viewer who used the command. {sender} is an older alias, same value.maya_live
{touser}The first word typed after the command, with any “@” removed. When nothing is typed, it falls back to the viewer's own name. {target} is the same thing.alex
{args}Everything typed after the command, as one string. Empty when nothing was typed.good luck on the exam
{channel}Your channel's display name.your_channel
One command, two very different sentences: !hug alone vs !hug alex.

Watch out A variable the bot doesn't recognize is left exactly as typed, braces included. If chat shows a literal {something}, check the spelling against the table above (or build the command in the builder, which only offers real variables).

04Dice, choices, and counters

at a glance Three variables that change every time: random numbers, random picks, and counters that remember.

{random}: dice

{random} becomes a whole number from 1 to 100. Pick your own range with {random:1-6} (both ends included).

{choice:…}: a coin with as many sides as you like

{choice:yes,no,ask again later} picks one option from your comma-separated list, fresh every time.

{counter:…}: a number that remembers

{counter:falls} adds 1 to a counter named "falls" and shows the new total. The count survives streams, so !fall can track your tumbles all year. Every counter has a scope, chosen when it's created, that decides whose number it is: one shared total for the channel, one per viewer, one pooled per command or reward, or one per viewer per command. The counters guide walks through all four with examples.

All three in the wild.

Counters need Loyalty Points Counters are stored by the Loyalty Points module. Switch it on first, or the {counter:…} stays as literal text. Your mods can manage counts in chat with !counter set, !counter reset and friends.

05Multiple lines & chat actions

at a glance Each line becomes its own chat message. A line can also announce, shout out, or pin.

A response can hold up to 5 lines, and each line is sent as its own chat message, top to bottom. And a line that starts with one of these verbs becomes a native Twitch action instead of a plain message:

Line starts withWhat happens
/meItalic "action" message, classic IRC style.
/announceA highlighted Twitch announcement. Color variants: /announceblue, /announcegreen, /announceorange, /announcepurple.
/shoutoutA native Twitch shoutout to the first name on the line.
/pinSends the message and pins it until the stream ends.
A two-line command: an announcement, then a normal message.

Built-in safety Viewer-supplied text ({args}, {touser}) is scrubbed before it lands in the message, so nobody can sneak a /ban or /timeout into your command's output.

06The rules of the road

at a glance Names, limits, cooldowns, and access levels. Everything the editor will and won't accept.

The editor checks all of this for you and says what's wrong in plain words. For reference:

FieldThe rule
Name1 to 64 characters, no spaces, and leave out the "!" (chat adds it). Stored lowercase: !Hug and !hug are the same command.
Alternate namesUp to 25, each following the same rules as the name.
ResponseUp to 5 lines, each up to 500 characters (one chat message per line).
Cooldown0 to 86400 seconds. It is shared by the whole chat: after anyone uses the command, everyone waits.
AccessMinimum rank, in order: everyone → subscribers → VIPs → moderators → lead moderators → broadcaster. Each level includes everyone above it.
Restrict to one userOptionally lock a command to a single Twitch account; that overrides the access level entirely. Perfect for one friend's personal command.

07Skip the typing: the builder

at a glance Compose a command by clicking, preview it live, send it to your dashboard.

Everything in this guide is baked into the command builder: pick variables from a labeled list instead of memorizing them, watch a live chat rehearsal as you type, and when it reads right, send it straight to your dashboard, where one press confirms and creates it. It is the fastest way to go from idea to working command.

Try it now Open the command builder →