diff --git a/Music-Bot.py b/Music-Bot.py index 466b5da..8ffcf58 100644 --- a/Music-Bot.py +++ b/Music-Bot.py @@ -195,7 +195,7 @@ else: finally: await ctx.send(f"{success}Now playing: `{player.title}`\nRequested by {ctx.author.mention}") while ctx.voice_client.is_playing(): - asyncio.sleep(3) + await asyncio.sleep(3) else: await ctx.voice_client.disconnect() @@ -208,9 +208,8 @@ else: player, after=lambda e: print(f"Player error: {e}") if e else None ) await ctx.respond(f"{success}Now playing: `{player.title}`\nRequested by {ctx.author.mention}") - print(dir(ctx.voice_client)) while ctx.voice_client.is_playing(): - asyncio.sleep(3) + await asyncio.sleep(3) else: await ctx.voice_client.disconnect() @@ -256,7 +255,7 @@ else: finally: await ctx.send(f"{success}Now playing: `{player.title}`\nRequested by {ctx.author.mention}") while ctx.voice_client.is_playing(): - asyncio.sleep(3) + await asyncio.sleep(3) else: await ctx.voice_client.disconnect() @@ -274,11 +273,6 @@ else: ctx.voice_client.stop() - @bot.event - async def on_voice_state_update(ctx: commands.Context): - ctx.voice_client.disconnect() - - @bot.event