WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
Showing only changes of commit 14750787b2 - Show all commits

View file

@ -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)