fix(aurora): changed how moderation changes are added. only log the information that is actually changed, and not everything
This commit is contained in:
parent
dc407c1125
commit
0c2cde1a78
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, {
|
moderation.changes.append(Change.from_dict(interaction.client, {
|
||||||
"type": "EDIT",
|
"type": "EDIT",
|
||||||
"timestamp": int(time.time()),
|
"timestamp": int(time.time()),
|
||||||
"reason": moderation.reason,
|
"reason": reason if reason else None,
|
||||||
"user_id": interaction.user.id,
|
"user_id": interaction.user.id,
|
||||||
"duration": timedelta_to_string(old_moderation.duration),
|
"duration": timedelta_to_string(moderation.duration) if duration else None,
|
||||||
"end_timestamp": moderation.end_timestamp,
|
"end_timestamp": moderation.end_timestamp if duration else None,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
await moderation.update()
|
await moderation.update()
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Change(AuroraBaseModel):
|
||||||
type: Literal["ORIGINAL", "RESOLVE", "EDIT"]
|
type: Literal["ORIGINAL", "RESOLVE", "EDIT"]
|
||||||
timestamp: datetime
|
timestamp: datetime
|
||||||
user_id: int
|
user_id: int
|
||||||
reason: Optional[str] = "No reason provided"
|
reason: Optional[str] = None
|
||||||
duration: Optional[timedelta] = None
|
duration: Optional[timedelta] = None
|
||||||
end_timestamp: Optional[datetime] = None
|
end_timestamp: Optional[datetime] = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue