From 14750787b2df1e7570562a97279beae22396308a Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Sat, 10 Aug 2024 13:34:15 -0400 Subject: [PATCH] fix(aurora): cast timestamps to integers --- aurora/models/moderation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aurora/models/moderation.py b/aurora/models/moderation.py index d8d930a..6d00fc2 100644 --- a/aurora/models/moderation.py +++ b/aurora/models/moderation.py @@ -321,10 +321,10 @@ class Moderation(AuroraGuildModel): params.append(t.key) if before: query += " WHERE timestamp < ?" - params.append(before.timestamp()) + params.append(int(before.timestamp())) if after: query += " WHERE timestamp > ?" - params.append(after.timestamp()) + params.append(int(after.timestamp())) if limit: query += " LIMIT ? OFFSET ?" params.extend((limit, offset)) @@ -354,10 +354,10 @@ class Moderation(AuroraGuildModel): params.append(t.key) if before: query += " AND timestamp < ?" - params.append(before.timestamp()) + params.append(int(before.timestamp())) if after: query += " AND timestamp > ?" - params.append(after.timestamp()) + params.append(int(after.timestamp())) query += " ORDER BY moderation_id DESC;" return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor) @@ -372,10 +372,10 @@ class Moderation(AuroraGuildModel): params.append(t.key) if before: query += " AND timestamp < ?" - params.append(before.timestamp()) + params.append(int(before.timestamp())) if after: query += " AND timestamp > ?" - params.append(after.timestamp()) + params.append(int(after.timestamp())) query += " ORDER BY moderation_id DESC;" return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor)