WIP: Refactor Aurora (3.0.0) #29
2 changed files with 4 additions and 4 deletions
|
@ -1087,10 +1087,10 @@ class Aurora(commands.Cog):
|
|||
moderation.changes.append(Change.from_dict(interaction.client, {
|
||||
"type": "EDIT",
|
||||
"timestamp": int(time.time()),
|
||||
"reason": moderation.reason,
|
||||
"reason": reason if reason else None,
|
||||
"user_id": interaction.user.id,
|
||||
"duration": timedelta_to_string(old_moderation.duration),
|
||||
"end_timestamp": moderation.end_timestamp,
|
||||
"duration": timedelta_to_string(moderation.duration) if duration else None,
|
||||
"end_timestamp": moderation.end_timestamp if duration else None,
|
||||
}))
|
||||
|
||||
await moderation.update()
|
||||
|
|
|
@ -14,7 +14,7 @@ class Change(AuroraBaseModel):
|
|||
type: Literal["ORIGINAL", "RESOLVE", "EDIT"]
|
||||
timestamp: datetime
|
||||
user_id: int
|
||||
reason: Optional[str] = "No reason provided"
|
||||
reason: Optional[str] = None
|
||||
duration: Optional[timedelta] = None
|
||||
end_timestamp: Optional[datetime] = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue