ajout de la commande lines
This commit is contained in:
parent
770792a5bd
commit
5eed8bab06
1 changed files with 8 additions and 0 deletions
|
@ -75,6 +75,14 @@ class Mybot(commands.Cog):
|
|||
async def ping(self, message):
|
||||
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
|
||||
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)
|
||||
|
||||
@commands.command(help="optionnal args : [livre] [character]")
|
||||
async def kaamelott(self, ctx, *args):
|
||||
response = None
|
||||
|
|
Loading…
Reference in a new issue