correction command issue

This commit is contained in:
BFlow 2020-03-25 18:22:03 +01:00
parent 679515ca84
commit f0985e4752

View file

@ -140,16 +140,16 @@ class Mybot(commands.Cog):
gl.auth()
if args[0] == 'list':
projects = gl.projects.list(search='Kabot')[0]
await ctx.channel.send(projects.name)
issues = projects.issues.list()
for issue in issues:
if "closed" == issue.state:
pass
else:
await ctx.channel.send('Issue: %s' % issue.title)
await ctx.channel.send('#' + str(issue.id) + ": " + issue.title + '\n' + issue.web_url)
elif args[0] == 'search':
query = ''.join(args[1:])
find_issues = gl.search("issues", query)
project = gl.projects.get('Kabot')
find_issues = project.search("issues", query)
for issue in find_issues:
await ctx.channel.send("#" + str(issue['id']) + ": " + issue['title'] + '\n' + issue['web_url'])
elif args[0] == 'add':