diff options
author | 2022-08-06 13:10:59 -0400 | |
---|---|---|
committer | 2022-08-16 16:38:26 -0400 | |
commit | 9fc8b5e72b0531dc0a05035b9e1f23dacaa404e9 (patch) | |
tree | 25061793ec357186910916156710f124ffa2be54 | |
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. |