Skip to content

Commit

Permalink
Fix bug in bot_stats where a db query's arguments weren't in a sequence.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Jul 22, 2024
1 parent 21cd02e commit 1f4e61d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exts/bot_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ async def track_command_use(self, ctx: core.Context) -> None:

if user_info:
stmt = "INSERT INTO users (user_id) VALUES ($1) ON CONFLICT (user_id) DO NOTHING;"
await db.executemany(stmt, [user.id for user in user_info], timeout=60.0)
await db.executemany(stmt, [(user.id,) for user in user_info], timeout=60.0)
if guild_info:
stmt = "INSERT INTO guilds (guild_id) VALUES ($1) ON CONFLICT (guild_id) DO NOTHING;"
await db.executemany(stmt, [guild.id for guild in guild_info], timeout=60.0)
await db.executemany(stmt, [(guild.id,) for guild in guild_info], timeout=60.0)

# Assemble the record to upsert.
cmd = (
Expand Down

0 comments on commit 1f4e61d

Please sign in to comment.