From 1c1c6ac503758c30f478d44e05c0a458ccad6e4c Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Thu, 25 Jun 2020 10:55:36 +0200 Subject: removed useless spaces --- cogs/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cogs/admin.py') diff --git a/cogs/admin.py b/cogs/admin.py index 1fb424e..14bd45e 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -12,7 +12,7 @@ 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): -- cgit v1.2.3 From 0cc41cc4778315ca7512588eec29a48cb314f20c Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Thu, 25 Jun 2020 12:53:01 +0200 Subject: Removed passwords and added a bot master whitelist --- cogs/admin.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cogs/admin.py') 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='') 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='') async def _load(self, ctx, ext): -- cgit v1.2.3