mirror of
https://github.com/myned/modufur.git
synced 2024-12-25 14:47:29 +00:00
Changed set prefix command to allow multiple prefixes
This commit is contained in:
parent
22aa1787e3
commit
c651ce7a0a
1 changed files with 5 additions and 3 deletions
|
@ -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"])}`')
|
||||||
|
|
Loading…
Reference in a new issue