diff options
Diffstat (limited to 'cogs/admin.py')
-rwxr-xr-x | cogs/admin.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index b3cc4f2..4d37003 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -2,6 +2,8 @@ from discord.ext import commands import discord import subprocess import json +import git +import os class Admin(commands.Cog): def __init__(self, bot): @@ -10,6 +12,20 @@ class Admin(commands.Cog): async def is_mod(ctx): return ctx.author.guild_permissions.manage_channels + @commands.command(aliases=['deleteEverything'], hidden=True) + @commands.check(is_mod) + async def purge(self, ctx, password): + if password == "MangoSucksAss": + async for msg in ctx.channel.history(): + await msg.delete() + + @commands.command() + @commands.check(is_mod) + async def pull(self, ctx): + g = git.cmd.Git(os.getcwd()) + g.pull() + await ctx.send("Probably pulled.") + @commands.command(aliases=['addcommand', 'newcommand']) @commands.check(is_mod) async def setcommand(self, ctx, command, *, message): |