@bot.command(pass_context = True, help="make bot leave vc")
async def leave(ctx):
if ctx.voice_client:
await ctx.guild.voice_client.disconnect()
await ctx.send('disconnected from vc')
else:
await ctx.send('im not currently in a vc')
I’m trying to make a discord bot disconnect from a discord voice channel and it doesn’t work. When I use the command, the bot sends “disconnected from vc” but does not actually disconnect.
New contributor
Doublecheese817 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.