explicitly specify replace into fields
This commit is contained in:
parent
9885dce544
commit
ecf96b427b
2 changed files with 3 additions and 6 deletions
|
@ -78,10 +78,7 @@ class Nomen(Bot):
|
|||
return prefix
|
||||
|
||||
async def set_guild_prefix(self, guild: Guild, prefix):
|
||||
await self.db.execute(
|
||||
"REPLACE INTO guilds VALUES(?, ?)",
|
||||
(guild.id, prefix),
|
||||
)
|
||||
await self.db.execute("REPLACE INTO guilds (guild_id, prefix) VALUES(?, ?)", (guild.id, prefix))
|
||||
self.prefixes[guild.id] = prefix
|
||||
|
||||
async def start(self, *args, **kwargs):
|
||||
|
|
|
@ -91,7 +91,7 @@ You may want to `{ctx.clean_prefix}nomen export` first"""
|
|||
f"You have now opted-out and will no longer trigger or receive notifications. To opt back in, run `{ctx.clean_prefix}nomen opt-in`"
|
||||
)
|
||||
|
||||
await self.bot.db.execute("REPLACE INTO users VALUES(?, 1)", (ctx.author.id,))
|
||||
await self.bot.db.execute("REPLACE INTO users (user_id, disabled) VALUES(?, 1)", (ctx.author.id,))
|
||||
await self.bot.db.commit()
|
||||
|
||||
@nomen.command(name="opt-in")
|
||||
|
@ -106,5 +106,5 @@ You may want to `{ctx.clean_prefix}nomen export` first"""
|
|||
f"You have opted back in and will now trigger and receive notifications. To opt out, run `{ctx.clean_prefix}nomen opt-out`"
|
||||
)
|
||||
|
||||
await self.bot.db.execute("REPLACE INTO users VALUES(?, 0)", (ctx.author.id,))
|
||||
await self.bot.db.execute("REPLACE INTO users (user_id, disabled) VALUES(?, 0)", (ctx.author.id,))
|
||||
await self.bot.db.commit()
|
||||
|
|
Loading…
Reference in a new issue