Help with this IRC callback: How do I get on_welcome to fire?

I’m using this twitchbot code as the basis for my bot: https://github.com/TwitchDev/chat-samples/tree/master/python

I can’t get it to work. on_welcome is never called, so my bot never joins a channel.

I’ve tried looking back through the IRC module, but it’s just a bit more advanced than I am knowledgeable in python.

How do I properly tell the irc module to run on_welcome() once it’s established a connection?

1 Like

Did you check for errors?

Is the Token you are using a valid oAuth token with the chat_login scope?

I’m having the same problem. I’m pretty sure I’m using a valid oAuth Token.

But just to be sure. the token is generated from this place is that correct ?

Also when I type in the Token I write something like this

oauthToken = 'oauth:{0}'.format(token)

I’m following the same basic twitch bot on the github OP referred to
and I must also state that I’m using this as an excuse to learn Python 3.6 so my knowledge in python is limited I’m mostly getting by on random google searches and knowhow from other programming languages.

Nope, wrong place.
That gives you your client secret that’s used for securing and authenticating some of the communication between your app and the Twitch API - one of those things is the OAuth workflow to get the OAuth token.

If you only need an OAuth token to connect to chat, and nothing else, you can use this simple tool to get one:
https://twitchapps.com/tmi/

If you want to do the OAuth workflow yourself and get a token (with maybe more permissions) this section of the docs is your friend (looks like a lot to swallow at first, but it’s actually way more easy and straight forward than it looks):

1 Like

Well that did it for me Thank you so much have been looking around for days to figure out what I did wrong.

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