From a38de40066f00e008b1fcf2b6cd51ea5cd6005a8 Mon Sep 17 00:00:00 2001 From: AnInternetTroll Date: Thu, 28 May 2020 14:23:58 +0100 Subject: pull and report command added, plus fixed Mango's trashy spacing --- cogs/admin.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cogs/admin.py') 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): -- cgit v1.2.3