diff options
-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 9fd851245..0a33c84ab 100644 --- a/bot/exts/moderation/infraction/management.py +++ b/bot/exts/moderation/infraction/management.py @@ -232,7 +232,7 @@ class ModManagement(commands.Cog): if request_data["expires_at"]: self.infractions_cog.schedule_expiration(new_infraction) # Timeouts are handled by Discord itself, so we need to edit the expiry in Discord as well - if infraction["type"] == "timeout": + if user and infraction["type"] == "timeout": await user.edit(reason=reason, timed_out_until=expiry) log_text += f""" |