From f9e5ade4447272006474fece502e9be6063b74c2 Mon Sep 17 00:00:00 2001 From: Lukas Blacha Date: Wed, 8 Feb 2023 18:15:48 +0100 Subject: [PATCH] Added prefix flag for Startup (Standard "<") --- Music-Bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Music-Bot.py b/Music-Bot.py index 49c679a..6366942 100644 --- a/Music-Bot.py +++ b/Music-Bot.py @@ -241,8 +241,7 @@ else: try: player = await YTDLSource.from_url(url, loop=bot.loop) ctx.voice_client.play( - player, after=lambda e: print(f"Player error: {e}") if e else None - ) + player, after=await ctx.voice.disconnect()) except discord.HTTPException as err: raise commands.CommandError(err) finally: @@ -262,6 +261,7 @@ else: ctx.voice_client.stop() + @bot.event async def on_application_command_error(ctx, error): print(f"[on_application_command_error]\n{ctx.author}\n{error}")