aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-06-10 15:32:25 +0200
committerGravatar GitHub <[email protected]>2021-06-10 15:32:25 +0200
commit7a1996b204472ec58fbc6f4af5caa09300e72f95 (patch)
tree825ea5ef8b4210427443097555aa291284a2e1c7
parentMerge pull request #1623 from python-discord/new_zapped_formats (diff)
parentTests: update infraction DM to mention UTC (diff)
Merge pull request #1633 from python-discord/infraction-dm-utc
Infraction: DM mention that the expiration is in UTC time
-rw-r--r--bot/exts/moderation/infraction/_utils.py2
-rw-r--r--tests/bot/exts/moderation/infraction/test_utils.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/moderation/infraction/_utils.py b/bot/exts/moderation/infraction/_utils.py
index a98b4828b..e4eb7f79c 100644
--- a/bot/exts/moderation/infraction/_utils.py
+++ b/bot/exts/moderation/infraction/_utils.py
@@ -164,7 +164,7 @@ async def notify_infraction(
text = INFRACTION_DESCRIPTION_TEMPLATE.format(
type=infr_type.title(),
- expires=expires_at or "N/A",
+ expires=f"{expires_at} UTC" if expires_at else "N/A",
reason=reason or "No reason provided."
)
diff --git a/tests/bot/exts/moderation/infraction/test_utils.py b/tests/bot/exts/moderation/infraction/test_utils.py
index ee9ff650c..50a717bb5 100644
--- a/tests/bot/exts/moderation/infraction/test_utils.py
+++ b/tests/bot/exts/moderation/infraction/test_utils.py
@@ -137,7 +137,7 @@ class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase):
title=utils.INFRACTION_TITLE,
description=utils.INFRACTION_DESCRIPTION_TEMPLATE.format(
type="Ban",
- expires="2020-02-26 09:20 (23 hours and 59 minutes)",
+ expires="2020-02-26 09:20 (23 hours and 59 minutes) UTC",
reason="No reason provided."
),
colour=Colours.soft_red,
@@ -193,7 +193,7 @@ class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase):
title=utils.INFRACTION_TITLE,
description=utils.INFRACTION_DESCRIPTION_TEMPLATE.format(
type="Mute",
- expires="2020-02-26 09:20 (23 hours and 59 minutes)",
+ expires="2020-02-26 09:20 (23 hours and 59 minutes) UTC",
reason="Test"
),
colour=Colours.soft_red,