How Does a Bot Verify That It Can Connect To A Channel?

I have a game integration that uses a IRC bot, connected to the users channel.

We have a problem with people entering the channel names of other broadcasters and the bot is sending commands to those channels. Obviously not the intented behaviour.

How can my bot verify that the channel name entered by the user is actually owned by the user??

The only easy way would be to actually have them log in and generate a token and then join that person’s channel. Even if you will send the messages with a different account, that would be the only sure-fire way that the channel you joined is the person controlling the bot. The other way would be to join and have some sort of command to start the game, but only if the person has the broadcaster badge, but as you said, that could mean sending messages to users who are not using the bot.

1 Like

You could have the user authorize with Twitch and get the name from the Oauth token. Or you could require the broadcaster (or at least a mod) of the channel you join to run a certain command before the bot interacts with the channel at all. If you can provide feedback on your interface on when the bot joined and the command should be run it could be done without the bot sending anything to chat.

1 Like

Good ideas. Simple. I like it.

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