Add error handler
This commit is contained in:
@@ -78,5 +78,14 @@ class Upload:
|
||||
else:
|
||||
await ctx.send(f'Loaded `{extension}`.')
|
||||
|
||||
@commands.command()
|
||||
async def gitserver(self, ctx):
|
||||
"""Pull latest commits, TMP until we have a solution"""
|
||||
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)
|
||||
import os
|
||||
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))
|
||||
Reference in New Issue
Block a user