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.