fix
This commit is contained in:
parent
10d46419df
commit
4fba648fe8
@ -132,7 +132,7 @@ async def play(ctx, *arg):
|
|||||||
bot.queue.enqueue(yt)
|
bot.queue.enqueue(yt)
|
||||||
await ctx.send('added {0} to queue'.format(yt.title))
|
await ctx.send('added {0} to queue'.format(yt.title))
|
||||||
|
|
||||||
if(ctx.voice_client.is_connected()):
|
if(ctx.voice_client.is_playing()):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
await bot.start_playing(ctx)
|
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)
|
yt.streams.filter(only_audio=True, file_extension='mp4').last().download(output_path=filepath, filename=filename, filename_prefix=fileprefix)
|
||||||
path = filepath + fileprefix + filename
|
path = filepath + fileprefix + filename
|
||||||
|
print("play here")
|
||||||
ctx.voice_client.play(discord.FFmpegPCMAudio(path), after=lambda e:event.set())
|
ctx.voice_client.play(discord.FFmpegPCMAudio(path), after=lambda e:event.set())
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user