I'm trying to make my discord bot disconnect the voice channel with a command like -disconnect using Lavalink. I have tried doing it in various approaches but it never seems to work for me. I also can't find many examples online. The most recent thing i've tried is this:
@commands.command()
async def leave(self, ctx):
guild_id = int(event.player.guild_id)
await self.connect_to(guild_id, None)
Tell me if you know how to make a disconnect command. Thanks!!!
This is discord.py rewrite btw.