1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Correct which table to save in when updating prefix

This commit is contained in:
phxntxm 2017-05-09 17:20:28 -05:00
parent 812988f00d
commit 913ca3ce68

View file

@ -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))