diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 6b985e3..01fbf60 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -76,12 +76,16 @@ class Mybot(commands.Cog): await message.channel.send('pong') @commands.command(help='count lines numbers in quote file') - async def lines(self, message): - path = '/home/mika/.kabot/%s.log' % message.channel + async def lines(self, ctx): + path = '/home/mika/.kabot/%s.log' % ctx.channel with open(path, 'r') as f: lines = f.read().splitlines() nb_lines = len(lines) - await message.channel.send("j'ai %s lignes dans mon stock" % nb_lines) + await ctx.channel.send("j'ai %s lignes dans mon stock" % nb_lines) + + @commands.command(help='slap this ass') + async def slap(self, ctx, user): + await ctx.channel.send("j'attrape %s est lui met une tarte!" % user) @commands.command(help="optionnal args : [livre] [character]") async def kaamelott(self, ctx, *args):