correction command issue
This commit is contained in:
parent
679515ca84
commit
f0985e4752
1 changed files with 3 additions and 3 deletions
|
@ -140,16 +140,16 @@ class Mybot(commands.Cog):
|
||||||
gl.auth()
|
gl.auth()
|
||||||
if args[0] == 'list':
|
if args[0] == 'list':
|
||||||
projects = gl.projects.list(search='Kabot')[0]
|
projects = gl.projects.list(search='Kabot')[0]
|
||||||
await ctx.channel.send(projects.name)
|
|
||||||
issues = projects.issues.list()
|
issues = projects.issues.list()
|
||||||
for issue in issues:
|
for issue in issues:
|
||||||
if "closed" == issue.state:
|
if "closed" == issue.state:
|
||||||
pass
|
pass
|
||||||
else:
|
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':
|
elif args[0] == 'search':
|
||||||
query = ''.join(args[1:])
|
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:
|
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'])
|
||||||
elif args[0] == 'add':
|
elif args[0] == 'add':
|
||||||
|
|
Loading…
Reference in a new issue