From f9e36be6a60c6fc915d5e781a39c0b57081c89f1 Mon Sep 17 00:00:00 2001 From: Milka64 Date: Sun, 15 Mar 2020 22:01:01 +0100 Subject: [PATCH] fix repeat cmd --- kabot/kabot/kabot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 0be6ae6..04154b3 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -165,12 +165,12 @@ class Mybot(commands.Cog): async def play_next(self): if self.sounds: source,ctx = self.sounds[0] - self.sounds_history.insert(source,0) - if self.sounds_history >5: - self.sounds_history = self.sounds_history[:5] if not ctx.voice_client.is_playing() and ctx.voice_client.is_connected(): ctx.voice_client.play(source, after=lambda e: print('Player error: %s' % e) if e else None) self.sounds.pop(0) + self.sounds_history.insert(source,0) + if self.sounds_history >5: + self.sounds_history = self.sounds_history[:5] def main():