This commit is contained in:
BFlow 2020-08-27 17:43:57 +02:00
parent bec13c53b5
commit cabbc221d1

View file

@ -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)
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')
async def commits(self, ctx):
gl = gitlab.Gitlab('https://git.0w.tf/', private_token='VHLsCQTcjF3oxujqFRYz')
gl.auth()
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)
await ctx.channel.send(dir(commit))
@commands.command()
async def disconnect(self, ctx):