Contents

Twitch IRC Capability: Commands

Overview

Command Description
CLEARCHAT Purge a user’s message(s), typically after a user is banned from chat or timed out.
CLEARMSG Single message removal on a channel. This is triggered via /delete <target-msg-id> on IRC.
HOSTTARGET Channel starts or stops host mode.
NOTICE General notices from the server.
RECONNECT Rejoin channels after a restart.
ROOMSTATE Identifies the channel’s chat settings (e.g., slow mode duration).
USERNOTICE Announces Twitch-specific events to the channel (e.g., a user’s subscription notification).
USERSTATE Identifies a user’s chat settings or properties (e.g., chat color).

CLEARCHAT (Twitch Commands)

Purge a user’s message(s), typically after a user is banned from chat or timed out.

> :tmi.twitch.tv CLEARCHAT #<channel> :<user>

Use with the tags capability; see CLEARCHAT (Twitch Tags), which has additional parameters.

Example: All chat is cleared (deleted) on the dallas channel.

> :tmi.twitch.tv CLEARCHAT #dallas

CLEARMSG (Twitch Commands)

Single message removal on a channel. This is triggered via /delete <target-msg-id> on IRC.

Use with the tags capability; see CLEARMSG (Twitch Tags).

> @login=<login>;target-msg-id=<target-msg-id> :tmi.twitch.tv CLEARMSG #<channel> :<message>
ParameterDescription
loginName of the user who sent the message.
messageThe message.
target-msg-idUUID of the message.

Example: ronni’s HeyGuys message is deleted from the dallas channel.

> @login=ronni;target-msg-id=abc-123-def :tmi.twitch.tv CLEARMSG #dallas :HeyGuys

HOSTTARGET (Twitch Commands)

Channel starts or stops host mode.

Host starts host mode:

> :tmi.twitch.tv HOSTTARGET #hosting_channel <channel> [<number-of-viewers>]

Host stops host mode:

> :tmi.twitch.tv HOSTTARGET #hosting_channel :- [<number-of-viewers>]
Parameter Description
number-of-viewers (Optional) Number of viewers watching the host.

NOTICE (Twitch Commands)

General notices from the server.

> @msg-id=<msg id>:tmi.twitch.tv NOTICE #<channel> :<message>
Parameter Description
message The message.
msg id A message ID string. Can be used for i18ln. Valid values: see Twitch IRC: msg-id Tags.

Example:

> @msg-id=slow_off :tmi.twitch.tv NOTICE #dallas :This room is no longer in slow mode.

RECONNECT (Twitch Commands)

Rejoin channels after a restart.

Twitch IRC processes occasionally need to be restarted. When this happens, clients that have requested the IRC v3 twitch.tv/commands capability are issued a RECONNECT. After a short time, the connection is closed. In this case, reconnect and rejoin channels that were on the connection, as you would normally.

ROOMSTATE (Twitch Commands)

Identifies the channel’s chat settings (e.g., slow mode duration).

Use with the tags capability; see ROOMSTATE (Twitch Tags), which has additional parameters.

> :tmi.twitch.tv ROOMSTATE #<channel>

USERNOTICE (Twitch Commands)

Announces Twitch-specific events to the channel (e.g., a user’s subscription notification).

Use with the tags capability; see USERNOTICE (Twitch Tags), which has additional parameters.

> :tmi.twitch.tv USERNOTICE #<channel> :message

USERSTATE (Twitch Commands)

Identifies a user’s chat settings or properties (e.g., chat color).

Use with the tags capability; see USERSTATE (Twitch Tags), which has additional parameters.

> :tmi.twitch.tv USERSTATE #<channel>