Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Bot leaving and not playing after rejoining #35

Open
salagean-mircea-30125 opened this issue Nov 2, 2021 · 1 comment
Open

Bot leaving and not playing after rejoining #35

salagean-mircea-30125 opened this issue Nov 2, 2021 · 1 comment

Comments

@salagean-mircea-30125
Copy link

When the bot leaves and rejoins i get an error when i whant him to play a song: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Not connected to voice.

@salagean-mircea-30125
Copy link
Author

@client.command()
async def stop(ctx):
player = music.get_player(guild_id=ctx.guild.id)
await player.stop()
await ctx.send("Stopped")

@client.command()
async def leave(ctx):
player = music.get_player(guild_id=ctx.guild.id)
await player.stop()
await ctx.voice_client.disconnect()
await ctx.send("Stopped")

Use this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant