diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index a97948e..3176792 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -73,13 +73,15 @@ class Mybot(commands.Cog): self.sounds = [] @commands.command(help='list des commits') - async def commits(self, ctx): + async def commits(self, ctx, number = 5): + number = int(number) gl = gitlab.Gitlab('https://git.0w.tf/', private_token='VHLsCQTcjF3oxujqFRYz') gl.auth() projects = gl.projects.list(search='Kabot')[0] - commits = projects.commits.list()[-5:] + commits = projects.commits.list()[-number:] for commit in commits: - await ctx.channel.send(commit['title'] + ": " + commit['author_name'] + ": " '\n' + commit['web_url']) + detail = commit.attributes + await ctx.channel.send(detail['title'] + ": " + detail['author_name'] + ": " '\n' + detail['web_url']) @commands.command() async def disconnect(self, ctx):