1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 21:02:38 +00:00

Added settings group command, moving delcmds and setprefix

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

View file

@ -173,9 +173,13 @@ class Administration:
await ctx.send('**Already auto-deleting in {}.** Type `stop` to stop.'.format(ctx.channel.mention), delete_after=7) await ctx.send('**Already auto-deleting in {}.** Type `stop` to stop.'.format(ctx.channel.mention), delete_after=7)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
@commands.command(name='deletecommands', aliases=['delcmds']) @commands.group(aliases=['setting', 'set', 's'])
@commands.has_permissions(administrator=True) @commands.has_permissions(administrator=True)
async def delete_commands(self, ctx): async def settings(self, ctx):
pass
@settings.command(name='deletecommands', aliases=['delcmds', 'delcmd'])
async def _settings_delete_commands(self, ctx):
if ctx.guild.id not in u.settings['del_ctx']: if ctx.guild.id not in u.settings['del_ctx']:
u.settings['del_ctx'].append(ctx.guild.id) u.settings['del_ctx'].append(ctx.guild.id)
else: else:
@ -184,9 +188,6 @@ 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']))
@commands.command(name='setprefix', aliases=['setpre', 'spre'])
@commands.has_permissions(administrator=True)
async def set_prefix(self, ctx, prefix=None):
if prefix is not None: if prefix is not None:
u.settings['prefixes'][ctx.guild.id] = prefix u.settings['prefixes'][ctx.guild.id] = prefix
else: else: