Skip to content
Guide 02

Commands & variables

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

16 min read

01The anatomy of a command

at a glanceTwo required fields, six 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 eight 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 cooldowns: who can use it, how long everyone waits after each use, and how long each viewer waits between their own uses.
  • Only while live parks the command when the stream is offline; Active is the on/off switch.
  • Data source: inserts a value fetched from one of your data sources instead of a variable.
The command editor as it docks beside your list, every field annotated.
Tip The Data source chip inserts {urlfetch:name}, a value pulled from a data source you saved yourself. The Data sources guide walks through saving your first one.

02Two ways to create one

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

From the dashboard

Commands, click New command, fill in the name and the response, then 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. Any moderator can run it: !cmd doesn't need the lead moderator promotion that some other built-ins ask for.

!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, cooldowns, aliases) and a live preview. Use whichever is closer to your hands.

03Variables: the smart parts

at a glanceCurly braces are placeholders the bot fills in when it replies. All of them are in the variables reference.

Write {user} in a response, and the bot swaps it for the name of whoever ran the command. That is a variable: a placeholder the bot fills in at the moment it replies. Every variable it understands, with its exact syntax and a worked example, lives in the variables reference.

Add a pipe and some text inside the braces to give a variable something to say when it comes back empty: hug {touser|everyone} hugs whoever you named, or everyone when you named nobody.

One command, two very different sentences: !hug alone vs !hug MikanMeerkat.
See every variable The variables reference lists syntax, examples, and which module each one needs, grouped the way you use them.

04Multiple lines & chat actions

at a glanceEach 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.

05The rules of the road

at a glanceNames, 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).
Shared cooldown0 to 86400 seconds. It is shared by the whole chat: after anyone uses the command, everyone waits. 0 turns it off.
Per-viewer cooldown0 to 86400 seconds. Each viewer waits this long between their own uses; everyone else can still run it once the shared cooldown ends. Alternate names count as the same command. 0 turns it off.
AccessMinimum rank, in order: everyone, subscribers, VIPs, moderators, lead moderators, broadcaster. Each level includes everyone above it.
Restrict to user IDOptionally lock a command to a single Twitch account; that overrides the access level entirely. Perfect for one friend's personal command. The field takes numbers only: the Twitch user ID, not the username. To find an ID, use a Twitch user ID lookup you trust, or a moderator tool that shows user IDs.

06Skip the typing: the builder

at a glanceCompose 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.