Skip to content

Twitch Docs Supplement

Julien edited this page Oct 25, 2020 · 3 revisions

The Twitch IRC docs are pretty comprehensive. However, some details are undocumented (at the time of writing). This page contains some of these undocumented details and features. It can be seen as a supplement to the official docs.

Message length limit

An IRC message usually contains several parts: tags, prefix, command and parameters. According to the IRC spec, the whole thing has a limit of 512 bytes (the IRCv3 spec adds 8 KiB for the tags, but still limits everything else to 512 bytes). However, according to my tests, Twitch IRC seems to apply the 512 byte limit only to the actual visible chat message part of the IRC message. This means two things:

  • An IRC message from/to Twitch may very well exceed 512 bytes (and often does)
  • The actual chat message is limited to 510 bytes (512 minus 2 for \r\n)

Interestingly enough, the Twitch.tv website does not currently implement any client-side message length checks. This means you can type in and send chat messages that exceed the 510 character limit and the message will be displayed in full on your side - but will be truncated to 510 characters for everyone else. seems to now limit the chat messages you can type into and send via the chat box to 500 (instead of 510) characters.

User name and display name length limits

According to a reddit post from 2015 and a forum post from BarryCarlyon in 2019, both the user names (nicks) and display names on Twitch can not exceed 25 characters.

Anonymous connection

While most tutorials and guides are based around a Twitch account with an OAuth token, you don't necessarily need those to connect to Twitch IRC: you can connect anonymously. This is great for simple programs, but you will only be able to read chat, not participate. Here is how an anonymous connection works (cheers to BarryCarlyon from the Twitch Dev Forums):

PASS <random_string>
NICK justinfan<random_number>

IPv6 support

According to my tests and the statement of Twitch Dev Forum user george, Twitch IRC does not currently support connections via IPv6.

Channel for non-channel specific commands

Some commands, like /w (whisper) and /color require you to specify a target channel, although they clearly are not channel-specific. The question is then: what channel do we use for such commands? Mostly, you will find people suggesting to use the #jtv channel (short for JustinTV, which was before TwitchTV).

However, there is a better solution as pointed out by BarryCarlyon: just use the channel of your bot/account. For example, if the account name you use to connect to Twitch IRC is peter123, use #peter123 as channel for those commands.

Clone this wiki locally