add author (!issue ad)

This commit is contained in:
BFlow 2020-04-24 12:02:23 +02:00
parent cc2bc6a287
commit 931ae99f4c

View file

@ -160,10 +160,11 @@ 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
projects = gl.projects.list()
for project in projects:
if "Kabot" == project.name:
issue = project.issues.create({'title': title})
issue = project.issues.create({'title': author})
await ctx.channel.send(issue.web_url)
else:
await ctx.channel.send('unknown command')