diff options
author | AnInternetTroll <lucafulger@gmail.com> | 2020-06-25 10:53:55 +0000 |
---|---|---|
committer | AnInternetTroll <lucafulger@gmail.com> | 2020-06-25 10:53:55 +0000 |
commit | f886686a981a9cd89b11a2dac5ac20c0c2b0de6f (patch) | |
tree | 1013a7ceff13b2f35b84ee6fccdd3fa4de339d4c /cogs | |
parent | 61bc1ec89bc62f12589558e1b942f6f57efb2ed8 (diff) | |
parent | 0cc41cc4778315ca7512588eec29a48cb314f20c (diff) | |
download | steve-bot-f886686a981a9cd89b11a2dac5ac20c0c2b0de6f.tar steve-bot-f886686a981a9cd89b11a2dac5ac20c0c2b0de6f.tar.gz steve-bot-f886686a981a9cd89b11a2dac5ac20c0c2b0de6f.tar.bz2 steve-bot-f886686a981a9cd89b11a2dac5ac20c0c2b0de6f.tar.lz steve-bot-f886686a981a9cd89b11a2dac5ac20c0c2b0de6f.tar.xz steve-bot-f886686a981a9cd89b11a2dac5ac20c0c2b0de6f.tar.zst steve-bot-f886686a981a9cd89b11a2dac5ac20c0c2b0de6f.zip |
Merge branch 'master' of https://github.com/AnInternetTroll/mcbeDiscordBot
Diffstat (limited to 'cogs')
-rwxr-xr-x | cogs/admin.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index 1fb424e..491180f 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -12,18 +12,18 @@ 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 == "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): |