diff --git a/aurora/aurora.py b/aurora/aurora.py index 0acd3bd..c43425f 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -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() diff --git a/aurora/models/change.py b/aurora/models/change.py index ca80336..b5c8ef8 100644 --- a/aurora/models/change.py +++ b/aurora/models/change.py @@ -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