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 = [] self.sounds = []
@commands.command(help='list des commits') @commands.command(help='list des commits')
async def commits(self, ctx, *args): async def commits(self, ctx):
if args: gl = gitlab.Gitlab('https://git.0w.tf/', private_token='VHLsCQTcjF3oxujqFRYz')
args = list(args) gl.auth()
gl = gitlab.Gitlab('https://git.0w.tf/', private_token='VHLsCQTcjF3oxujqFRYz') projects = gl.projects.list(search='Kabot')[0]
gl.auth() commits = projects.commits.list()[-5:]
if args[0] == 'list': for commit in commits:
projects = gl.projects.list(search='Kabot')[0] await ctx.channel.send(commit.comment)
commits = projects.commits.list()[-5:] await ctx.channel.send(commit.str)
for commit in commits: await ctx.channel.send(dir(commit))
await ctx.channel.send(commit.comment)
await ctx.channel.send(commit.str)
else:
await ctx.channel.send('unknown command')
@commands.command() @commands.command()
async def disconnect(self, ctx): async def disconnect(self, ctx):