From cabbc221d1be76fa6f298881e7b1ef5551637fb9 Mon Sep 17 00:00:00 2001 From: BFlow Date: Thu, 27 Aug 2020 17:43:57 +0200 Subject: [PATCH] test --- kabot/kabot/kabot.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 46adc2e..d6c5d65 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -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):