fix set_cmd_usable db helper function
@@ -106,9 +106,9 @@ class Database(commands.Cog):
async def set_cmd_usable(self, gid, cmd, usable):
async with self.db.acquire() as con:
if usable:
- await con.execute('INSERT INTO disabled VALUES ($1, $2)', gid, cmd)
- else:
await con.execute('DELETE FROM disabled WHERE gid = $1 AND cmd = $2')
+ else:
+ await con.execute('INSERT INTO disabled VALUES ($1, $2)', gid, cmd)
async def fetch_user(self, uid):
user = await self.db.fetchrow('SELECT * FROM users WHERE uid = $1', uid)
