1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

Added a custom prefix command

This commit is contained in:
phxntxm 2016-08-31 14:10:33 -05:00
parent 6bd265fc59
commit ce7151612e

View file

@ -255,6 +255,16 @@ class Mod:
await config.save_content('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.custom_perms(manage_server=True)
async def prefix(self, ctx, *, prefix: str):
"""This command can be used to set a custom prefix per server"""
prefixes = config.get_content('prefix')
prefixes[ctx.message.server.id] = prefix
config.save_content('prefixes', prefixes)
await self.bot.say(
"I have just updated the prefix for this server; you now need to call commands with `{}`".format(prefix))
@commands.command(pass_context=True, no_pm=True)
@checks.custom_perms(manage_messages=True)
async def purge(self, ctx, limit: int = 100):