ok now it should work
Build and publish ich_iel bot / build (push) Successful in 5m53s

This commit is contained in:
2026-04-30 17:13:01 +02:00
parent 9acb6b04eb
commit 0e368ade2f
+3 -2
View File
@@ -20,6 +20,7 @@ async def play(ctx, *, url: str):
if voice_state is None or voice_state.channel_id is None: if voice_state is None or voice_state.channel_id is None:
await ctx.reply("You're not in a voice channel!") await ctx.reply("You're not in a voice channel!")
return return
channel = await _bot.fetch_channel(str(voice_state.channel_id))
logging.info(f"Playing {url}") logging.info(f"Playing {url}")
ydl_opts = { ydl_opts = {
'format': 'm4a/bestaudio/best', 'format': 'm4a/bestaudio/best',
@@ -36,7 +37,7 @@ async def play(ctx, *, url: str):
title = info.get('title', 'Unknown Title') title = info.get('title', 'Unknown Title')
logging.info(f"Downloaded to {filename}") logging.info(f"Downloaded to {filename}")
ctx.send(f"Playing {title} in {voice_state.channel.mention}") await ctx.reply(f"Playing {title} in {channel.mention}")
async with await voice_state.channel.connect(_bot) as vc: async with await channel.connect(_bot) as vc:
await vc.play_file(filename) await vc.play_file(filename)