You need to have a database of the channels to connect to. When a user says “!join” or you say "!join " in the main bot channel, it will check the database for an entry, add it if not in there, and then send the JOIN command with the channel name: “JOIN #channel_name” – then you also need the same for PART-ing and removing from the database.
1 Like