1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 22:27:28 +00:00

Changed set prefix command to allow multiple prefixes

This commit is contained in:
Myned 2017-11-20 06:11:29 -05:00
parent 22aa1787e3
commit c651ce7a0a

View file

@ -188,10 +188,12 @@ class Administration:
await ctx.send('**Delete command invocations:** `{}`'.format(ctx.guild.id in u.settings['del_ctx'])) await ctx.send('**Delete command invocations:** `{}`'.format(ctx.guild.id in u.settings['del_ctx']))
if prefix is not None: @settings.command(name='prefix', aliases=['pre', 'p'])
u.settings['prefixes'][ctx.guild.id] = prefix async def _settings_prefix(self, ctx, *prefixes):
if prefixes:
u.settings['prefixes'][ctx.guild.id] = prefixes
else: else:
with suppress(KeyError): with suppress(KeyError):
del u.settings['prefixes'][ctx.guild.id] del u.settings['prefixes'][ctx.guild.id]
await ctx.send(f'**Prefix set to:** `{"` or `".join(prefix if ctx.guild.id in u.settings["prefixes"] else u.config["prefix"])}`') await ctx.send(f'**Prefix set to:** `{"` or `".join(prefixes if ctx.guild.id in u.settings["prefixes"] else u.config["prefix"])}`')