Twitch
Retrieve the follower count, live viewer count or channel name of a Twitch channel.
The Twitch counter follows one Twitch channel and returns its follower count, how many people are watching right now, or the channel's display name.
Availability: a custom bot, a self-hosted bot or the legacy premium bot. It does not work on the free public bot. A self-hosted bot needs TWITCH_CLIENT_ID and TWITCH_CLIENT_SECRET in its .env; see the configuration reference.

Options
Display
Picks what the counter outputs: Followers, Viewers or Channel name.
Starts on Followers. Does not accept a nested counter.
Username
The Twitch channel to follow.
Type the login name, the part after twitch.tv/. It also accepts a nested counter, which must return a valid username.
What it returns
Display
Value
Followers
How many followers the channel has.
Viewers
The viewer count while the stream is live, or the text offline, in lower case, when it is not.
Channel name
The channel's display name, with the capitalisation the streamer chose. It can differ from the login you typed.
Formatting
Followers and a live Viewers count are numbers, so the Format settings panel applies. Channel name and offline are text and come back untouched. See Formatting counters.
Refresh and caching
The bot keeps each channel's data for 15 minutes, so a stream that just went live can take up to 15 minutes to show up. More in How counters update.
Examples
Display = Followers, Username = example, Use compact notation = Yes.
A channel with 1,240 followers shows as 1.2K.
Display = Viewers, Username = example.
While the stream is live the channel shows the viewer count, for example Viewers: 342. The rest of the time it reads offline. To use your own wording off air, nest the Twitch counter in a Replace counter and replace offline.

Errors
The bot is not a premium version and lacks certain features needed for this counter.
The counter is running on the free public bot. Use the legacy premium bot, a custom bot, or self-host.
The Twitch counter requires a username to be set.
Fill in Username, or check that the nested counter in it returns a name.
The specified Twitch channel could not be found.
No Twitch channel has that login name. Check the spelling against the channel address.
On a self-hosted bot with no TWITCH_CLIENT_ID and TWITCH_CLIENT_SECRET, every Twitch counter fails with a raw error instead. Get the credentials from the Twitch developer console and set both variables. See Troubleshooting.
Last updated