[JAVA] Adding a bot to the user's channel once the app has been authenticated to their channel

Hey I want to know how I can connect my bot to the user’s channel when they have added the bot to their apps.

Right now I just have TestBot testBot = new TestBot(); test.connect(); test.joinChannel("#evlerr"); test.start();

What IRC framework are you using? I also don’t see any part of your code that is submitting your OAuth token when connecting to the server.

I have a constructor in the TestBot class that submits the Auth token and I’m using this https://github.com/CavariuX/TwitchIRC/wiki/Create-Your-Bot

In that case your code looks to be valid. <bot_instance>.joinChannel("#evlerr"); will cause the bot to connect to the channel specified.

yep so im wondering how I can make it join other people’s channels once the bot (application) is added to their acc.

bump please help!

That’s up to you to decide how you want to design your application. Most basic bots will use a chat command such as !join which when used in the channel where the bot is present will trigger it to join the requester’s channel and add the channel it’s an auto-join database so it can be joined again when the bot restarts.

More advanced bots such as Moobot and Nightbot allow you to log in to a web portal and then have a join button there which will internally trigger the bot to join a channel and store the info in it’s auto-join database.

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