Correct which table to save in when updating prefix
This commit is contained in:
parent
812988f00d
commit
913ca3ce68
|
@ -9,6 +9,7 @@ import rethinkdb as r
|
|||
|
||||
valid_perms = [p for p in dir(discord.Permissions) if isinstance(getattr(discord.Permissions, p), property)]
|
||||
|
||||
|
||||
class Administration:
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
@ -93,7 +94,6 @@ class Administration:
|
|||
await utils.update_content('server_settings', update, key)
|
||||
await ctx.send(fmt)
|
||||
|
||||
|
||||
@commands.command()
|
||||
@commands.guild_only()
|
||||
@utils.custom_perms(manage_guild=True)
|
||||
|
@ -243,7 +243,6 @@ class Administration:
|
|||
|
||||
await ctx.send("This channel is not registered as a 'nsfw' channel!")
|
||||
|
||||
|
||||
@commands.group(invoke_without_command=True)
|
||||
@commands.guild_only()
|
||||
@utils.custom_perms(send_messages=True)
|
||||
|
@ -405,7 +404,7 @@ class Administration:
|
|||
'prefix': prefix}
|
||||
|
||||
if not await utils.update_content('server_settings', entry, key):
|
||||
await utils.add_content('prefixes', entry)
|
||||
await utils.add_content('server_settings', entry)
|
||||
|
||||
if prefix is None:
|
||||
fmt = "I have just cleared your custom prefix, the default prefix will have to be used now"
|
||||
|
@ -486,5 +485,6 @@ class Administration:
|
|||
else:
|
||||
await ctx.send("I have just removed that rule from your list of rules!")
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Administration(bot))
|
||||
|
|
Loading…
Reference in a new issue