Discord.py rewrite bot not joining voice channel

Viewed 20

So i tried most of the stackoverflow post's solutions and none of them worked.

async def join(ctx):
    destination = ctx.author.voice.channel
    if ctx.voice_state.voice:
        await ctx.voice_state.voice.move_to(destination)
        return
    
    ctx.voice_state.voice = await destination.connect()
    await ctx.send(f"Joined {ctx.author.voice.channel} Voice Channel")```
1 Answers

To make a bot join ur voice channel,

async def join(ctx):
   vc = ctx.author.voice.channel
   await vc.connect()
Related