diff --git a/ticker.py b/ticker.py index 71cf8a9..d2346b8 100644 --- a/ticker.py +++ b/ticker.py @@ -25,11 +25,7 @@ def update(func): voice_client = await channel.connect() source = discord.FFmpegOpusAudio(filename) - voice_client.play(source, after=lambda e: print('fucky wucky: %s' % e) if e else None) - - while voice_client.is_playing(): - pass - await voice_client.disconnect() + voice_client.play(source, after = lambda _: voice_client.disconnect()) print(filename + " played at " + str(datetime.now())) return wrapper