diff options
| author | Merlintor <[email protected]> | 2020-01-26 14:43:10 +0100 |
|---|---|---|
| committer | Merlintor <[email protected]> | 2020-01-26 14:43:10 +0100 |
| commit | 1451f790a01bf9b42c9e364d75cff4560f988a76 (patch) | |
| tree | 4f4bfddcfaaca23d5c2cdb07dd6817fdebe44a1f | |
| parent | Document the new opus loading behaviour (diff) | |
| download | discord.py-1451f790a01bf9b42c9e364d75cff4560f988a76.tar.xz discord.py-1451f790a01bf9b42c9e364d75cff4560f988a76.zip | |
Explicitly check for guild object
| -rw-r--r-- | discord/message.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py index 62585735..fb5f5d04 100644 --- a/discord/message.py +++ b/discord/message.py @@ -41,6 +41,7 @@ from .member import Member from .flags import MessageFlags from .file import File from .utils import escape_mentions +from .guild import Guild class Attachment: @@ -441,7 +442,7 @@ class Message: def _handle_author(self, author): self.author = self._state.store_user(author) - if self.guild is not None: + if isinstance(self.guild, Guild): found = self.guild.get_member(self.author.id) if found is not None: self.author = found |