diff --git a/r0b3bot.py b/r0b3bot.py index 654604a..6245f62 100644 --- a/r0b3bot.py +++ b/r0b3bot.py @@ -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() ###