Trying to get a way for bot to join channels through oauth

There’s 2 ways to get a bot to join a channel with the tmi.js library, either specifying that channel in the options you connect with, or using the client.join(channel) function.

If you want the bot to join their own channel then you would simply put that channel in the channels array options, or just client.join(channel) if it’s already connected. If you don’t know what the username is that the bot is connected as you can use the User Access token with the Get Users endpoint https://dev.twitch.tv/docs/api/reference#get-users to retrieve the username and then join to that.

1 Like