From 9d116f78903d2b47bd2f864cfe657b4b0f2146e1 Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Sun, 7 Aug 2016 14:26:44 -0500 Subject: [PATCH] Added a purge command --- cogs/mod.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cogs/mod.py b/cogs/mod.py index d97bb27..cb9e925 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -155,6 +155,12 @@ class Mod: del custom_perms[ctx.message.server.id][cmd] config.saveContent('custom_permissions', custom_perms) await self.bot.say("I have just removed the custom permissions for {}!".format(cmd)) + + @commands.command(pass_context=True, no_pm=True) + @checks.customPermsOrRole(manage_messages=True) + async def purge(self, ctx, limit: int=100): + """This command is used to a purge a number of messages from the channel""" + await self.bot.purge_from(ctx.message.channel,limit=limit) @commands.group(aliases=['rule'], pass_context=True, no_pm=True, invoke_without_command=True) @checks.customPermsOrRole(send_messages=True)