Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions bot/cogs/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,11 @@ def _infraction_to_string(self, infraction_object: Dict[str, Union[str, int, boo
active = infraction_object["active"]
user_id = infraction_object["user"]
hidden = infraction_object["hidden"]
created = datetime.fromisoformat(infraction_object["inserted_at"]).strftime("%Y-%m-%d %H:%M")
if infraction_object["expires_at"] is None:
expires = "*Permanent*"
else:
expires = datetime.fromisoformat(infraction_object["expires_at"]).strftime("%Y-%m-%d %H:%M")

lines = textwrap.dedent(f"""
{"**===============**" if active else "==============="}
Expand All @@ -1268,8 +1273,8 @@ def _infraction_to_string(self, infraction_object: Dict[str, Union[str, int, boo
Type: **{infraction_object["type"]}**
Shadow: {hidden}
Reason: {infraction_object["reason"] or "*None*"}
Created: {infraction_object["inserted_at"]}
Expires: {infraction_object["expires_at"] or "*Permanent*"}
Created: {created}
Expires: {expires}
Actor: {actor.mention if actor else actor_id}
ID: `{infraction_object["id"]}`
{"**===============**" if active else "==============="}
Expand Down