diff options
| author | 2021-08-02 19:41:30 -0700 | |
|---|---|---|
| committer | 2021-08-02 19:41:30 -0700 | |
| commit | c1fcab3ba4767cac481fa32ebaf2db31b108faa4 (patch) | |
| tree | 70af7da10046d693af827731cb5d2a23ab7a2439 | |
| parent | Merge pull request #1704 from python-discord/whitelist-pydis-partners (diff) | |
Fix TypeError when infraction append is not given a reason
Fix #1706
| -rw-r--r-- | bot/exts/moderation/infraction/management.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/infraction/management.py b/bot/exts/moderation/infraction/management.py index 4b0cb78a5..3094159cd 100644 --- a/bot/exts/moderation/infraction/management.py +++ b/bot/exts/moderation/infraction/management.py @@ -81,7 +81,7 @@ class ModManagement(commands.Cog): """ old_reason = infraction["reason"] - if old_reason is not None: + if old_reason is not None and reason is not None: add_period = not old_reason.endswith((".", "!", "?")) reason = old_reason + (". " if add_period else " ") + reason |