Weird issue - Twitch IRC bot's messages including 'Hello' don't send

I’ve been trying my hand at crafting a custom Twitch bot for my own use. In order to make sure the bot works properly, I made a simple command, ~say, which has the bot repeat back whatever it was sent. However, it seemed to be working very intermittently - sometimes it would respond, sometimes it wouldn’t.

At one point, I realized that the messages that were being sent through the websocket, but not appearing on Twitch, all started with the word ‘hello’. (And, apparently, messages containing the word ‘hello’ also disappear). Is this normal? I couldn’t seem to find any documentation about this online, and it seems like a pretty weird word to exclude. I thought I had the weirdest bug for a … very long time.

I’ve also checked in incognito mode to verify it’s not a weird interaction between extensions.

  1. Make your bot able to output/debug NOTICE’s / Raw from TwitchChat

b) if all you are sending is hello, you are hitting the “you can’t send the same/duplicate message within 30 seconds” when the bot/user is not a mod.

The bot is a mod, and I’ve tested a variety of phrases, they don’t go through if they contain the word ‘hello’. I’ll admit this could be something… strange.

I’ll try and figure out how to get the debug information from Twitch.

I’m not sure if you could elaborate on getting NOTICE’s / Raw from TwitchChat; I’ve searched around and haven’t been able to find anything that seems to shed light on how to do that.

Here’s the full output of my program, with the indented lines being the requests sent to the websocket, and the not indented lines being any and all non-PING responses received from the server.

Although, this might all be a bit moot, because it seems like Twitch has 2 more (?) APIs, and it seems this one is indeed going away by the end of the year (or not?).

Your log says you are sending to the channel moduser as the user moduser

The channel moduser is currently banned on Twitch. or 404’s

For the API yes, for Chat no. Theres TMI over IRC or Websocket.

Just dump all the lines coming out, when you send it’ll raise a notice if theres a issue.

Sounds like might be a issue with your library instead

The channel moduser is currently banned on Twitch. or 404’s

Sorry, I just edited it in the hopes it would be a bit clearer (that the accounts are all modded). In retrospect, that probably confused things. These are the full logs:

I’m not using a library other than Python’s socket library. The line of code:

socket.send(b'PRIVMSG #dfolder :Hello, my friends.\r\n')

does not appear in the Twitch chat, however

socket.send(b'PRIVMSG #dfolder :Helo, my friends.\r\n')

does appear.

I am dumping all responses from the socket received that are not PINGs. I get all of the initial information (“Welcome, GLHF!”, “Your host is”, etc) along with what appears to be an incomplete NAMES list (just lists the bot and not myself, not sure why that is, probably unrelated) I also see all of the messages sent by my user. But no NOTICES, even when I have the bot say something like “/host”. Which leads me to believe there might be some sort of extra protocol for receiving NOTICES, but I haven’t had any luck finding documentation on that yet.

I’ve looked further into it and I’m definitely not receiving NOTICEs either, although I can’t imagine why that would be the case. Haven’t been able to find any documentation on how to enable that; I’m definitely dumping all data received through the initial socket. Do you need a separate connection for NOTICEs or something, perhaps?

All right, it turns out the issue was on my end (what a surprise… Twitch doesn’t ban the word Hello after all!)

Thanks for your help. I wasn’t receiving NOTICEs because some combination of “CAP REQ”, “CAP REQ”, and “CAP REQ” had to be sent to the server first. I think I would have long given up on this if not for your responses, honestly, so thanks! Everything’s sorted out now, thank goodness.

And, if you’re wondering, I really, really hate to admit it, but… apparently the word “hello” was on my channel’s banlist. From several years ago, I’m guessing. Sigh.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.