changing play delay to check if file is still being played #70

Merged
Rich merged 1 commits from dev into master 2020-06-22 15:36:20 +00:00
+3 -1
View File
@@ -287,7 +287,9 @@ async def play_sound(ctx, member : discord.Member, soundFile, command, playtime)
print(f" - Playing {soundFile}")
time.sleep(1)
voice.play(audio_source, after=None)
time.sleep(playtime)
while voice.is_playing():
await asyncio.sleep(1)
#time.sleep(playtime)
print(f" - Disconnecting from '{channel}'")
await voice.disconnect()
###