From f0985e4752516d9bbe3758aa3daf8e7ca957efc4 Mon Sep 17 00:00:00 2001 From: BFlow Date: Wed, 25 Mar 2020 18:22:03 +0100 Subject: [PATCH] correction command issue --- kabot/kabot/kabot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 495968a..108c3f9 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -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':