This commit is contained in:
Arthur Lu 2022-08-24 22:03:51 +00:00
parent 10d46419df
commit 4fba648fe8

View File

@ -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: