fix(aurora): cast timestamps to integers
This commit is contained in:
parent
14dc256919
commit
14750787b2
1 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue