correction N°2 command issue

This commit is contained in:
BFlow 2020-03-25 18:25:51 +01:00
parent f0985e4752
commit 014fbb35ee

View file

@ -148,7 +148,7 @@ class Mybot(commands.Cog):
await ctx.channel.send('#' + str(issue.id) + ": " + issue.title + '\n' + issue.web_url) await ctx.channel.send('#' + str(issue.id) + ": " + issue.title + '\n' + issue.web_url)
elif args[0] == 'search': elif args[0] == 'search':
query = ''.join(args[1:]) query = ''.join(args[1:])
project = gl.projects.get('Kabot') project = gl.projects.list(search='Kabot')[0]
find_issues = project.search("issues", query) find_issues = project.search("issues", query)
for issue in find_issues: for issue in find_issues:
await ctx.channel.send("#" + str(issue['id']) + ": " + issue['title'] + '\n' + issue['web_url']) await ctx.channel.send("#" + str(issue['id']) + ": " + issue['title'] + '\n' + issue['web_url'])