Issues with reading messages in channel

So, I’m writing a chat bot in c++ that at ONE POINT was working correctly. The bot in it’s current stat will join my channel and appears in the user list. Can see member join events and prints them out. Can even get whispers. ChatPlays/twitch.cpp at main · kenshen112/ChatPlays · GitHub

I cannot for the life of me figure out why I was able to have it join my channel previously and it was able to read messages from chat but it cannot now. I have tried joining with the bots username and oauth token. I have also tried joining it as myself with an oauth key generated with that account.

I’m joining with a channel name in all lowercase, the bots name is all lowercase so neither of those are the issue and as I’d previously mentioned it appears in the user list. Can anyone help me?

My first guess is that you forget to add oauth: in front of your OAuth token in like #84

std::string buf1 = ("PASS " + settings.oauthToken + “\r\n”);

If that’s not the problem, try logging all raw lines you get from the server and look for error messages.

It’s in the settings file itself I have the oauth: and to my understanding the bot wouldn’t join if the oauth was wrong would it?

And I mean that as a genuine question

Log all response messages the server sends you to check for USERNOTICE or NOTICE messages.

hatebin So, I printed as much of the log as possible. There’s no visual feedback I can see error wise

Seems for whatever reason after joining a room correctly (weirdbeardgame), with no errors, your script is no longer listening for incoming messages from the IRC server.

If you leave this running are you getting PING and reply to this with PONG’s?

Yes I am. So again, It appears in the channel active user list. It get’s pings and replies with pongs. I can whisper dm and those messages will appear. It just won’t get anything from chat. It makes me think this could be an issue with oauth scops but my understanding was that the twitch tmi site would cover that

never rely on someone elses generator, using someone else clientID

If you don’t have chat:read then that could be an issue yes.

Check what you tokeh has with the validate endpoint

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