Skip to content

Rules

Build rules in Bearsong: when a chat message or a stream moment matches your conditions, the bot replies, waits, runs an AI reply, moves a widget and more.

Live and chatLast updated

Rules (formerly Flows) are the way to say "when this happens, do that". A rule says what to look for and what to do. It can start from a chat message, such as a viewer asking "when is the next stream", or from a stream moment, such as an ad break starting or a watch streak being shared. Its steps run in order: a reply, an AI reply, a short wait, a widget action and more.

Where to find it#

Open Rules in the sidebar. The sidebar reads Home, Live, Multichat, Rules, Analytics, so Rules sits between Multichat and Analytics. It works for Twitch and Discord triggers alike, and you can open it whichever platform you have connected. Rules used to be a tab of Automations, and flows were turned into rules before that. Old links to the Automations tab and to the Flows address open this page.

Before you start#

Build a rule#

  1. Under New rule, give it a Name.
  2. Under When, choose A chat message matches, or a stream moment such as A watch streak is shared.
  3. For a chat message, open Which messages match. Choose Add condition and pick what to Check, for example Message contains with the words to look for. Use Add an alternative for a second set of conditions that can also match.
  4. Add an action, such as Send a chat message. Choose a placeholder button, such as {user}, to put the viewer's name in the text.
  5. Choose Check message under Try a message to see whether a message would match and what the rule would say. Nothing is saved or sent.
  6. Make sure Rule enabled is ticked, then choose Save rule.

Conditions#

Choose what each condition checks:

CheckWhat it looks at
Message contains, is exactly, starts with, ends withThe words of the chat message. Tick Match capital letters to make it case sensitive.
Message matches a patternA pattern of up to 200 characters, for advanced matching.
Viewer roleWho sent it, such as is at least VIPs and above.
Stream statusLive, Offline, or Live or offline.
Random chanceA Chance (per cent) from 0 to 100, so a rule runs only some of the time.
Time of day (UTC)A window between From (UTC) and Until (UTC). A window can cross midnight.

Message checks only exist for A chat message matches. A stream moment can use the other checks under Extra checks, and a plain field for the number it carries, such as Watch streak of at least. Tick Match only when this is not true to turn any condition round.

Stream moments#

MomentPlaceholders you can use
An ad break starts{duration_seconds}
A watch streak is shared{streak_count}, {points_awarded}
A moderator anniversary{months}
A custom Power-up is redeemed{reward_title}, {bits}, {user_input}
A Power-up is used with Bits{reward_title}, {bits}, {user_input}
Gifted Drops are summarised{recipient_count}

Every rule can also use {user}, {user_id}, {broadcaster} and {rule_name}. Chat message rules add {message}, {game}, {uptime}, {stream_title}, {viewer_count} and {random_viewer}.

Actions#

Actions run in order, top to bottom. Move an action with its move up and move down buttons.

ActionWhat it does
Send a chat messagePosts a message of up to 400 characters. It can use placeholders.
Send an AI replyChat message rules only, one per rule. Asks the AI to write the reply from your instructions and the message.
Set a variableChat message rules only. Saves a value under a name that later messages can use as {name}.
WaitPauses for up to 30 seconds before the next action.
Widget, scene and other actionsThe same actions as Command Deck buttons.

Twitch actions#

Under Twitch in the action list, a rule can act on your channel with your own Twitch connection. You do not need to reconnect Twitch for them.

ActionWhat it does
Create a clip and Add a stream markerOnly while you are live. A title or description can use placeholders.
Change the title or categoryA new title (it can use placeholders), a category found with the search, or both.
Give a shoutout and Start a raidTo a channel you name, or to the viewer who triggered the rule, for example the raider (a trigger without a viewer, such as a title change, cannot use this). Cancel the raid stops one that has not gone out.
Start a poll, End the pollPolls need Affiliate or Partner.
Start a prediction, Lock, Pick the prediction winner (by its place in the list), CancelCancelling gives everyone their points back.
Create a channel point reward, Change a channel point rewardTurn a reward on or off, pause it or change its cost. Twitch only lets Bearsong change rewards made in Bearsong.
Complete or refund the redemptionOnly with Someone redeems a reward. Marks that redemption as done or refunds the points, for rewards made in Bearsong.
Change a chat modeSlow, followers-only, subscriber-only or emote-only mode, on or off.

Rules may run 20 Twitch actions a minute. Twitch has its own limits too, for example one shoutout every 2 minutes. A rule that starts when the title or category changes, when you give a shoutout or when you raid cannot change the title, give a shoutout or start a raid, because Twitch would start rules again and again. If a Twitch action does not work, the Rules list says why beside the last run.

For a chat message rule, the first actions that only need chat run straight away in chat: messages, one AI reply and variables. The first Wait hands the rest of the rule to the automation engine, so a wait never holds up your chat. The editor tells you which actions run in chat and which run in the automation engine, which handles everything after that.

Settings#

  • Priority: 0 to 100, for chat message rules. When more than one rule matches a message, the one with the highest priority runs.
  • Per-viewer cooldown in seconds: how long before the same viewer can run the rule again. This is what a flow called its cooldown.
  • Rule cooldown in seconds: how long before anyone can run it again.

Good to know#

  • A flow that ran another flow is now one rule with all the actions in order, with waits between them.
  • Every reply a chat message rule sends counts towards your Twitch chat AI allowance.
  • Twitch chat AI's Wait between replies to one person (seconds) and Replies per minute across everyone limits apply to chat message rules too.
  • A rule for a stream moment cannot send an AI reply, because there is no message to answer.
  • Each channel can run up to 60 rules a minute and send up to 10 rule messages a minute, counted across chat and the automation engine.
  • A change you save can take up to 20 seconds to reach chat.
  • A pattern cannot repeat a group that already repeats or branches, such as (a+)+. Such patterns can freeze matching, so they are refused when you save.

A rule is not running#

  • Check the Twitch chat AI is on switch is on and that Reply trigger is one of the two rule choices.
  • Check the rule is switched on, then use Try a message with the exact message to see which condition fails.
  • Check another rule with a higher Priority is not matching first.
  • Check the rule's cooldowns and the Twitch chat AI limits.

Open rules