I have been working with a Python script that connects to Twitch IRC and sends messages to chat. The script works fine for normal chat rooms but I’m having trouble with channels that have follower-only mode enabled.
When I test this code on regular channels everything works as expected. However when I try the same approach on channels with follower-only restrictions I get identical server responses but the message doesn’t appear in chat.
The response I receive looks like this:
:tmi.twitch.tv 001 my_bot_name :Welcome, GLHF!
:tmi.twitch.tv 002 my_bot_name :Your host is tmi.twitch.tv
:tmi.twitch.tv 003 my_bot_name :This server is rather new
:tmi.twitch.tv 004 my_bot_name :-
:tmi.twitch.tv 375 my_bot_name :-
:tmi.twitch.tv 372 my_bot_name :You are in a maze of twisty passages, all alike.
:tmi.twitch.tv 376 my_bot_name :>
Is there something specific I need to modify in my code to handle follower-only chat rooms properly?
Your IRC code is fine - it’s working correctly. Twitch just silently drops messages from non-followers when follower-only mode is on. No error codes, nothing. Make sure your bot actually follows the channel first. You can’t do this through IRC - you’ll need Twitch’s REST API or just follow manually beforehand. Also watch for follow-age requirements. Some streamers want you following for X hours/days before you can chat. Your bot might be following but still getting filtered if it’s too new. I’d add a Twitch API check to verify your bot’s follow status and follow-age before sending messages. Way easier than guessing why stuff isn’t showing up.
Your code’s fine. Twitch follower-only mode blocks messages from accounts that don’t follow the channel - doesn’t matter how you send them through IRC.
Your bot needs to follow the channel first. Managing this manually across multiple channels is a nightmare though.
I hit this same issue building chat automation for streamers at work. Latenode saved me from going crazy trying to handle it all.
With Latenode you can:
Auto-follow channels before messaging
Handle follow delay requirements
Manage multiple bots across channels
Set up retry logic for failed messages
I built a flow that checks if you’re following, follows if not, waits however long needed, then sends the message. Way cleaner than managing all that state in Python.
The visual builder makes it easy to add conditions and handle different channel requirements without writing complex IRC code.
yeah, your bot has to follow the streamer first. twitch won’t give u any error - it just silently drops the msg. super annoying. also, some channels require u to follow for 10+ mins before u can chat, so even if you’re following, it might not work immediately.