diff options
| author | 2022-08-06 13:10:59 -0400 | |
|---|---|---|
| committer | 2022-08-06 13:10:59 -0400 | |
| commit | 4a9bcdf44263d4ff1d144ec22d43d3e83c3ad85c (patch) | |
| tree | f4d5167d281e87bdafe84fe31d9d645a802049f4 | |
| parent | Infraction duration fallback if no `last_applied` field (diff) | |
Changed datetime.now to arrow.utcnow
- Used arrow.utcnow to reduce complexity and import
| -rw-r--r-- | bot/exts/moderation/infraction/_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/moderation/infraction/_utils.py b/bot/exts/moderation/infraction/_utils.py index 470ce05e1..eda56b97c 100644 --- a/bot/exts/moderation/infraction/_utils.py +++ b/bot/exts/moderation/infraction/_utils.py @@ -1,5 +1,5 @@ import typing as t -from datetime import datetime, timezone +from datetime import datetime import arrow import discord @@ -92,7 +92,7 @@ async def post_infraction( log.trace(f"Posting {infr_type} infraction for {user} to the API.") - current_time = datetime.now(tz=timezone.utc) + current_time = arrow.utcnow() payload = { "actor": ctx.author.id, # Don't use ctx.message.author; antispam only patches ctx.author. |