diff options
| author | 2021-08-11 19:56:10 +0100 | |
|---|---|---|
| committer | 2021-08-22 20:03:35 +0100 | |
| commit | aa8c455f9ef919cfc21f0a99cae5a878ec57853f (patch) | |
| tree | c0ce4ecdc63eadafb527458002ed0fdfa3c7c27b | |
| parent | Fix import (diff) | |
Fix isinstance check
| -rw-r--r-- | bot/exts/moderation/infraction/_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/infraction/_utils.py b/bot/exts/moderation/infraction/_utils.py index fe9815600..827623936 100644 --- a/bot/exts/moderation/infraction/_utils.py +++ b/bot/exts/moderation/infraction/_utils.py @@ -79,7 +79,7 @@ async def post_infraction( active: bool = True ) -> t.Optional[dict]: """Posts an infraction to the API.""" - if isinstance(user, MemberOrUser) and user.bot: + if isinstance(user, (discord.Member, discord.User)) and user.bot: log.trace(f"Posting of {infr_type} infraction for {user} to the API aborted. User is a bot.") raise InvalidInfractedUserError(user) |