contrepeterie
This commit is contained in:
parent
98b6f66a90
commit
a4a85e929f
1 changed files with 14 additions and 2 deletions
|
@ -160,11 +160,10 @@ class Mybot(commands.Cog):
|
|||
await ctx.channel.send("#" + str(issue['id']) + ": " + issue['title'] + '\n' + issue['web_url'])
|
||||
elif args[0] == 'add':
|
||||
title = ' '.join(args[1:])
|
||||
author = title + ' - By ' + ctx.message.author.name
|
||||
projects = gl.projects.list()
|
||||
for project in projects:
|
||||
if "Kabot" == project.name:
|
||||
issue = project.issues.create({'title': author})
|
||||
issue = project.issues.create({'title': title})
|
||||
await ctx.channel.send(issue.web_url)
|
||||
else:
|
||||
await ctx.channel.send('unknown command')
|
||||
|
@ -197,6 +196,19 @@ class Mybot(commands.Cog):
|
|||
except:
|
||||
response = "Unknow error, try: !kaamelott [livre] [character]"
|
||||
await ctx.send(response)
|
||||
|
||||
@commands.command(help="optionnal args : ")
|
||||
async def contrepeterie(self, ctx, *args):
|
||||
response = None
|
||||
path = '/home/mika/kabot/kabot/kabot/ressources/contrepeteries.txt'
|
||||
lines = open(path).read().splitlines()
|
||||
myline =random.choice(lines)
|
||||
|
||||
try:
|
||||
response = "%s" % (myline)
|
||||
except:
|
||||
response = "Unknow error, try: !contrepeterie [mot clef]"
|
||||
await ctx.send(response)
|
||||
|
||||
@commands.command(help="Je menotte une cornemuse et je fume Eddy Malou")
|
||||
async def kamoulox(self, ctx):
|
||||
|
|
Loading…
Reference in a new issue