Skip to content

Split twitch connections & JOIN on read connection only#17

Merged
zneix merged 4 commits into
masterfrom
zneix/feat/split-twitch-connections
Mar 12, 2026
Merged

Split twitch connections & JOIN on read connection only#17
zneix merged 4 commits into
masterfrom
zneix/feat/split-twitch-connections

Conversation

@zneix

@zneix zneix commented Mar 10, 2026

Copy link
Copy Markdown
Owner

We now have two connections to twitch instead of just one authenticated:

  1. anonymous read-only connection; it JOINs all the channels and can use fast ratelimit (due to being anon) and parses all incoming messages.
  2. authenticated connection dedicated to writing; provides bot the ability to speak in chats and handling USERSTATE messages - which are responsible for detecting bot being privileged or not.

This also simplifies the mod/vip detection logic with newly available message user fields from go-twitch-irc.
With this change, we will no longer receive mod/vip data from intially JOINing the channel.

@zneix zneix force-pushed the zneix/feat/split-twitch-connections branch from 45dffc1 to db55c30 Compare March 11, 2026 23:26
zneix added 3 commits March 12, 2026 12:41
this also refactors the mod/vip detection logic
with this change, we will no longer receive mod/vip data from intially
JOINing the channel
anonymous connections can join channels very fast so we don't have to
worry about slow JOINs anymore
@zneix zneix force-pushed the zneix/feat/split-twitch-connections branch from db55c30 to e5b8914 Compare March 12, 2026 11:42
@zneix zneix merged commit d46afa5 into master Mar 12, 2026
4 checks passed
@zneix zneix deleted the zneix/feat/split-twitch-connections branch March 12, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant