add command last

This commit is contained in:
BFlow 2020-05-05 16:54:49 +02:00
parent 0d397e06a4
commit 0352ea290e

View file

@ -113,6 +113,12 @@ class Mybot(commands.Cog):
await channel.connect() await channel.connect()
await asyncio.sleep(2) 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') @commands.command(help='count lines numbers in quote file')
async def lines(self, ctx): async def lines(self, ctx):
path = '/data/log/%s.log' % ctx.channel path = '/data/log/%s.log' % ctx.channel