aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-10-19 17:31:34 +0200
committerGravatar Johannes Christ <[email protected]>2019-10-19 17:31:34 +0200
commit48a78deb42d5a96066d96f19e87e7b8586cd62bd (patch)
tree5b29cf18715393b0f2fbf0aa202de0d418e33aa5
parentPluralize "infractions" as necessary. (diff)
Do not display an expiry for notes or warnings.
-rw-r--r--bot/cogs/moderation/infractions.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py
index e17a9844c..f2ae7b95d 100644
--- a/bot/cogs/moderation/infractions.py
+++ b/bot/cogs/moderation/infractions.py
@@ -437,7 +437,13 @@ class Infractions(Scheduler, commands.Cog):
# Default values for the confirmation message and mod log.
confirm_msg = f":ok_hand: applied"
- expiry_msg = f" until {expiry}" if expiry else " permanently"
+
+ # Specifying an expiry for a note or warning makes no sense.
+ if infr_type in ("note", "warning"):
+ expiry_msg = ""
+ else:
+ expiry_msg = f" until {expiry}" if expiry else " permanently"
+
dm_result = ""
dm_log_text = ""
expiry_log_text = f"Expires: {expiry}" if expiry else ""