Added a purge command
This commit is contained in:
parent
1002dcc9a8
commit
9d116f7890
1 changed files with 6 additions and 0 deletions
|
@ -156,6 +156,12 @@ class Mod:
|
||||||
config.saveContent('custom_permissions', custom_perms)
|
config.saveContent('custom_permissions', custom_perms)
|
||||||
await self.bot.say("I have just removed the custom permissions for {}!".format(cmd))
|
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)
|
@commands.group(aliases=['rule'], pass_context=True, no_pm=True, invoke_without_command=True)
|
||||||
@checks.customPermsOrRole(send_messages=True)
|
@checks.customPermsOrRole(send_messages=True)
|
||||||
async def rules(self, ctx):
|
async def rules(self, ctx):
|
||||||
|
|
Loading…
Reference in a new issue