From 0352ea290ea3dfbd7b57ae7a43ce49a59368c93b Mon Sep 17 00:00:00 2001 From: BFlow Date: Tue, 5 May 2020 16:54:49 +0200 Subject: [PATCH] add command last --- kabot/kabot/kabot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 191c63e..d785c9d 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -113,6 +113,12 @@ class Mybot(commands.Cog): await channel.connect() await asyncio.sleep(2) + @commands.command(help="detail du dernier son joué") + async def last(self, ctx, number = 1): + number = int(number) + for sound in self.sounds_history[0:number]: + await ctx.channel.send(sound[0]) + @commands.command(help='count lines numbers in quote file') async def lines(self, ctx): path = '/data/log/%s.log' % ctx.channel