You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
how can i use this bot in multiple channels with different servers?
bot cant join different voice channels when connect to a voice channel and play music.
The text was updated successfully, but these errors were encountered:
Hi not sure if you still need it but what worked for me is changing self.music_queue into a dictionary with ctx.guild.id as the key and the rest as the value just so that the music queue isn't all in one list. I had an issue where server#2's music also plays in server#1's music as well. Also change any reference of self.music_queue to self.music_queue[ctx.guild.id].
Another thing I changed was in the cogs specifically:
in the async def play_music(self, ctx): function
I changed the line from if self.vc == None or not self.vc.is_connected():
to
voice_client = nextcord.utils.get(self.bot.voice_clients, guild=ctx.guild)
if self.vc == None or not voice_client:
I use nextcord but discord.py should work.
I might be wrong but seems like self.vc.is_connected() checks if your bot connected to any voice channel at all servers it is in so changing that should allow your bot to join different voice channels in different servers
how can i use this bot in multiple channels with different servers?
bot cant join different voice channels when connect to a voice channel and play music.
The text was updated successfully, but these errors were encountered: