Added prefix flag for Startup (Standard "<")

This commit is contained in:
Lukas Blacha
2023-02-08 18:15:48 +01:00
parent 40671616f3
commit f9e5ade444

View File

@@ -241,8 +241,7 @@ else:
try: try:
player = await YTDLSource.from_url(url, loop=bot.loop) player = await YTDLSource.from_url(url, loop=bot.loop)
ctx.voice_client.play( 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: except discord.HTTPException as err:
raise commands.CommandError(err) raise commands.CommandError(err)
finally: finally:
@@ -262,6 +261,7 @@ else:
ctx.voice_client.stop() ctx.voice_client.stop()
@bot.event @bot.event
async def on_application_command_error(ctx, error): async def on_application_command_error(ctx, error):
print(f"[on_application_command_error]\n{ctx.author}\n{error}") print(f"[on_application_command_error]\n{ctx.author}\n{error}")