diff options
| -rw-r--r-- | bot/exts/filtering/_settings_types/actions/infraction_and_notification.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bot/exts/filtering/_settings_types/actions/infraction_and_notification.py b/bot/exts/filtering/_settings_types/actions/infraction_and_notification.py index 3b59c2feb..a7fb37ca9 100644 --- a/bot/exts/filtering/_settings_types/actions/infraction_and_notification.py +++ b/bot/exts/filtering/_settings_types/actions/infraction_and_notification.py @@ -101,6 +101,13 @@ class Infraction(Enum): member = await get_or_fetch_member(channel.guild, user.id) if member: user = member + else: + log.warning( + f"The user {user} were set to receive an automatic {command_name}, " + "but they were not found in the guild." + ) + return + ctx = FakeContext(message, channel, command) if self.name in ("KICK", "WARNING", "WATCH", "NOTE"): await command(ctx, user, reason=reason or None) |