From 4fba648fe8cdff5bcdc3a7678ee3c6c0a791fe53 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 24 Aug 2022 22:03:51 +0000 Subject: [PATCH] fix --- src/musicbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/musicbot.py b/src/musicbot.py index c0068bb..43b00d3 100644 --- a/src/musicbot.py +++ b/src/musicbot.py @@ -132,7 +132,7 @@ async def play(ctx, *arg): bot.queue.enqueue(yt) await ctx.send('added {0} to queue'.format(yt.title)) - if(ctx.voice_client.is_connected()): + if(ctx.voice_client.is_playing()): pass else: await bot.start_playing(ctx) @@ -162,6 +162,7 @@ async def start_playing(ctx): yt.streams.filter(only_audio=True, file_extension='mp4').last().download(output_path=filepath, filename=filename, filename_prefix=fileprefix) path = filepath + fileprefix + filename + print("play here") ctx.voice_client.play(discord.FFmpegPCMAudio(path), after=lambda e:event.set()) else: