From 46737185bcb42a286a8c733227a606fea4906e29 Mon Sep 17 00:00:00 2001 From: annihilator708 Date: Sun, 20 May 2018 21:45:47 +0200 Subject: [PATCH] Contributers now can pull latest commits --- src/cogs/upload.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cogs/upload.py b/src/cogs/upload.py index 7e77075..f41e843 100644 --- a/src/cogs/upload.py +++ b/src/cogs/upload.py @@ -2,7 +2,7 @@ # -*- coding: -*- from discord.ext import commands -import discord +import os import traceback class Upload: @@ -78,5 +78,14 @@ class Upload: else: await ctx.send(f'Loaded `{extension}`.') + @commands.command() + async def git(self, ctx): + """Pull latest commits""" + if ctx.author.id not in self.bot.ownerlist: + return await ctx.send('Only my creator can use me like this :blush:', delete_after=1) + + pull = os.popen('git pull').read() + await ctx.send(f'Pull complete\n```sh\n{pull}\n```') + def setup(bot): bot.add_cog(Upload(bot)) \ No newline at end of file