test
This commit is contained in:
parent
bec13c53b5
commit
cabbc221d1
1 changed files with 9 additions and 13 deletions
|
@ -73,19 +73,15 @@ class Mybot(commands.Cog):
|
|||
self.sounds = []
|
||||
|
||||
@commands.command(help='list des commits')
|
||||
async def commits(self, ctx, *args):
|
||||
if args:
|
||||
args = list(args)
|
||||
async def commits(self, ctx):
|
||||
gl = gitlab.Gitlab('https://git.0w.tf/', private_token='VHLsCQTcjF3oxujqFRYz')
|
||||
gl.auth()
|
||||
if args[0] == 'list':
|
||||
projects = gl.projects.list(search='Kabot')[0]
|
||||
commits = projects.commits.list()[-5:]
|
||||
for commit in commits:
|
||||
await ctx.channel.send(commit.comment)
|
||||
await ctx.channel.send(commit.str)
|
||||
else:
|
||||
await ctx.channel.send('unknown command')
|
||||
await ctx.channel.send(dir(commit))
|
||||
|
||||
@commands.command()
|
||||
async def disconnect(self, ctx):
|
||||
|
|
Loading…
Reference in a new issue