diff options
author | Mango0x45 <dogelikestopkekmemes@gmail.com> | 2020-06-25 10:53:01 +0000 |
---|---|---|
committer | Mango0x45 <dogelikestopkekmemes@gmail.com> | 2020-06-25 10:53:01 +0000 |
commit | 0cc41cc4778315ca7512588eec29a48cb314f20c (patch) | |
tree | c496416237231fb962339967e03a72b16f6f6674 /cogs | |
parent | 1c1c6ac503758c30f478d44e05c0a458ccad6e4c (diff) | |
download | steve-bot-0cc41cc4778315ca7512588eec29a48cb314f20c.tar steve-bot-0cc41cc4778315ca7512588eec29a48cb314f20c.tar.gz steve-bot-0cc41cc4778315ca7512588eec29a48cb314f20c.tar.bz2 steve-bot-0cc41cc4778315ca7512588eec29a48cb314f20c.tar.lz steve-bot-0cc41cc4778315ca7512588eec29a48cb314f20c.tar.xz steve-bot-0cc41cc4778315ca7512588eec29a48cb314f20c.tar.zst steve-bot-0cc41cc4778315ca7512588eec29a48cb314f20c.zip |
Removed passwords and added a bot master whitelist
Diffstat (limited to 'cogs')
-rwxr-xr-x | cogs/admin.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index 14bd45e..491180f 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -15,15 +15,15 @@ class Admin(commands.Cog): @commands.command(aliases=['deleteEverything'], hidden=True) @commands.check(is_mod) - async def purge(self, ctx, password): - if password == "MaxCantBeTrusted": + async def purge(self, ctx): + if ctx.author.id in self.bot.config[str(ctx.message.guild.id)]["bot_masters"]: async for msg in ctx.channel.history(): await msg.delete() @commands.command(aliases=['quit'], hidden=True) @commands.check(is_mod) - async def forceexit(self, ctx, password): - if password == "abort": + async def forceexit(self, ctx): + if ctx.author.id in self.bot.config[str(ctx.message.guild.id)]["bot_masters"]: await ctx.message.delete() exit() @@ -50,8 +50,8 @@ class Admin(commands.Cog): json.dump(self.bot.custom_commands, f, indent=4) await ctx.send(f"Removed command {command}") - - + + @commands.check(is_mod) @commands.command(name='reload', hidden=True, usage='<extension>') async def _reload(self, ctx, ext): @@ -68,7 +68,7 @@ class Admin(commands.Cog): except commands.ExtensionFailed: await ctx.send(f'Some unknown error happened while trying to reload extension {ext} (check logs)') self.bot.logger.exception(f'Failed to reload extension {ext}:') - + @commands.check(is_mod) @commands.command(name='load', hidden=True, usage='<extension>') async def _load(self, ctx, ext): |