Roadie

Chat message event

Automation · 5 min read ·

Any chat line, including a bot’s or an extension’s. A trigger on it needs an Only when check — the words, who wrote it — so it never runs on every line.

Chat message (twitch.chat_message) — Any chat line, including a bot’s or an extension’s. A trigger on it needs an Only when check — the words, who wrote it — so it never runs on every line.

Source: twitch. Selection: Events picker. Before it can fire: Chat log switched on. Each matching incoming line can start a separate run. A viewer can set it off again at will, so a trigger on it has a whole-chat cooldown and a per-viewer cooldown, like a command.

Start a flow

Select this event in Automation where its selection flow is available, then add any conditions and actions. A real occurrence matching the event starts the flow. The Test panel can supply representative sample fields, but Run test applies every action for real. Use only harmless actions while learning the trigger, and inspect its recent run before enabling effectful steps.

Trigger fields

These are the typed fields declared for this event. An optional value may be absent in a particular run; confirm a real event before relying on it.

  • {user} — Username; person; required; Their name and avatar — for an extension, its bot; sample: StreamStickers (@streamstickers).
  • {message} — The line; viewer_text; required; What they wrote — read literally; sample: NachoAverage triggered a Super Skeleton Dance! Super Sticker for 1500 Bits!.
  • {twitch.chatter_user_id} — Chatter id; text; required; Twitch’s id for the chatter; sample: 1004.
  • {twitch.chatter_user_login} — Chatter login; text; required; The login of the chatter, lower case; sample: streamstickers.
  • {twitch.chatter_user_name} — Chatter display name; text; required; The display name of the chatter; sample: StreamStickers.
  • {twitch.message.text} — Message text; viewer_text; optional; What they wrote — read literally; sample: NachoAverage triggered a Super Skeleton Dance! Super Sticker for 1500 Bits!.
  • {twitch.message_id} — Message id; text; optional; Twitch’s id for the chat line.
  • {twitch.message_type} — Message type; text; optional; Twitch’s kind of line, such as text or channel_points_highlighted.
  • {twitch.color} — Name color; text; optional; The chatter’s name color, as #RRGGBB. Empty when unset.
  • {twitch.badges} — Badges; text; optional; The chatter’s badges as set/version, comma-separated: subscriber/12,moderator/1.
  • {twitch.reply.parent_message_id} — Reply to: message id; text; optional; Twitch’s id for the line it replies to.
  • {twitch.reply.parent_user_id} — Reply to: id; text; optional; Twitch’s id for the chatter it replies to.
  • {twitch.reply.parent_user_login} — Replying to; text; optional; The login of the chatter this line replies to.
  • {twitch.reply.parent_user_name} — Replying to: display name; text; optional; The display name of the chatter this line replies to.
  • {twitch.reply.parent_message_body} — The line it replies to; viewer_text; optional; The line this one replies to — read literally.
  • {twitch.reply.thread_message_id} — Thread: message id; text; optional; Twitch’s id for the line that started the thread.
  • {twitch.reply.thread_user_id} — Thread: id; text; optional; Twitch’s id for who started the thread.
  • {twitch.reply.thread_user_login} — Thread started by; text; optional; The login of who started the thread.
  • {twitch.reply.thread_user_name} — Thread started by: display name; text; optional; The display name of who started the thread.
  • {twitch.channel_points_custom_reward_id} — Reward id; text; optional; The channel-point reward the line was sent with.
  • {twitch.channel_points_animation_id} — Animation id; text; optional; The channel-point message effect the line was sent with.
  • {twitch.source_broadcaster_user_id} — Typed in: id; text; optional; In a shared chat, Twitch’s id for the channel the line was typed in.
  • {twitch.source_broadcaster_user_login} — Typed in; text; optional; In a shared chat, the login of the channel the line was typed in.
  • {twitch.source_broadcaster_user_name} — Typed in: display name; text; optional; In a shared chat, the display name of the channel the line was typed in.
  • {twitch.source_message_id} — Typed in: message id; text; optional; In a shared chat, the line’s id in its own channel.
  • {twitch.is_source_only} — Only in its own chat; flag; optional; In a shared chat, whether the line stayed in the channel it was typed in.

Fill-ins offered for this trigger

This is the editor’s event-specific fill-in list for this trigger. Person fields also expose their login, display name, Twitch ID and avatar address. Shared channel fill-ins are available separately.

  • {user} — Username.
  • {user.login} — Username — their login, for links.
  • {user.name} — Username — their display name.
  • {user.id} — Username — their Twitch id.
  • {user.avatar} — Username — their avatar picture, for a Discord card (picture address).
  • {message} — The line.
  • {twitch.chatter_user_id} — Chatter id.
  • {twitch.chatter_user_login} — Chatter login.
  • {twitch.chatter_user_name} — Chatter display name.
  • {twitch.message.text} — Message text.
  • {twitch.message_id} — Message id.
  • {twitch.message_type} — Message type.
  • {twitch.color} — Name color.
  • {twitch.badges} — Badges.
  • {twitch.reply.parent_message_id} — Reply to: message id.
  • {twitch.reply.parent_user_id} — Reply to: id.
  • {twitch.reply.parent_user_login} — Replying to.
  • {twitch.reply.parent_user_name} — Replying to: display name.
  • {twitch.reply.parent_message_body} — The line it replies to.
  • {twitch.reply.thread_message_id} — Thread: message id.
  • {twitch.reply.thread_user_id} — Thread: id.
  • {twitch.reply.thread_user_login} — Thread started by.
  • {twitch.reply.thread_user_name} — Thread started by: display name.
  • {twitch.channel_points_custom_reward_id} — Reward id.
  • {twitch.channel_points_animation_id} — Animation id.
  • {twitch.source_broadcaster_user_id} — Typed in: id.
  • {twitch.source_broadcaster_user_login} — Typed in.
  • {twitch.source_broadcaster_user_name} — Typed in: display name.
  • {twitch.source_message_id} — Typed in: message id.
  • {twitch.is_source_only} — Only in its own chat.

Check a run

Open the flow’s run log after a real event or a safe test. Check that the expected event fired and that its conditions matched. A connector or upstream service can prevent a real event from arriving even when a sample test succeeds.

Browse events · Use fill-ins