aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2020-10-08 17:18:06 +0800
committerGravatar kosayoda <[email protected]>2020-10-08 17:18:06 +0800
commit11283adc3858e88bfbf69e1751f9cc6fccbb8c18 (patch)
tree8d5cc49c408b03aab1781da1c759b21dd30edea6
parentResolve logic error with reason override. (diff)
Improve default argument.
-rw-r--r--bot/exts/moderation/infraction/_scheduler.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py
index b68921dad..5c3e445f6 100644
--- a/bot/exts/moderation/infraction/_scheduler.py
+++ b/bot/exts/moderation/infraction/_scheduler.py
@@ -83,7 +83,7 @@ class InfractionScheduler:
user: UserSnowflake,
action_coro: t.Optional[t.Awaitable] = None,
user_reason: t.Optional[str] = None,
- additional_info: t.Optional[str] = None,
+ additional_info: t.Optional[str] = "",
) -> bool:
"""
Apply an infraction to the user, log the infraction, and optionally notify the user.
@@ -102,9 +102,6 @@ class InfractionScheduler:
if user_reason is None:
user_reason = reason
- if additional_info is not None:
- additional_info = ""
-
log.trace(f"Applying {infr_type} infraction #{id_} to {user}.")
# Default values for the confirmation message and mod log.