aboutsummaryrefslogtreecommitdiff
path: root/cogs/admin.py
diff options
context:
space:
mode:
authorAnInternetTroll <lucafulger@gmail.com>2020-05-28 13:23:58 +0000
committerAnInternetTroll <lucafulger@gmail.com>2020-05-28 13:23:58 +0000
commita38de40066f00e008b1fcf2b6cd51ea5cd6005a8 (patch)
treeeea062421efc121b6641fff5bdeb96f548b95d93 /cogs/admin.py
parent378991480ec483bb963fe4289d375b071d3203bb (diff)
downloadsteve-bot-a38de40066f00e008b1fcf2b6cd51ea5cd6005a8.tar
steve-bot-a38de40066f00e008b1fcf2b6cd51ea5cd6005a8.tar.gz
steve-bot-a38de40066f00e008b1fcf2b6cd51ea5cd6005a8.tar.bz2
steve-bot-a38de40066f00e008b1fcf2b6cd51ea5cd6005a8.tar.lz
steve-bot-a38de40066f00e008b1fcf2b6cd51ea5cd6005a8.tar.xz
steve-bot-a38de40066f00e008b1fcf2b6cd51ea5cd6005a8.tar.zst
steve-bot-a38de40066f00e008b1fcf2b6cd51ea5cd6005a8.zip
pull and report command added, plus fixed Mango's trashy spacing
Diffstat (limited to 'cogs/admin.py')
-rwxr-xr-xcogs/admin.py16
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):