diff options
| author | Rapptz <[email protected]> | 2015-11-19 22:20:07 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-11-19 22:21:15 -0500 |
| commit | e88c194e9af044af25020c64c72f1746ec4cf67e (patch) | |
| tree | 2b03b5f4cb474a6513abd89654eaa8b1d4078c3d /discord/message.py | |
| parent | Fix ordering issue with Message.server (diff) | |
| download | discord.py-e88c194e9af044af25020c64c72f1746ec4cf67e.tar.xz discord.py-e88c194e9af044af25020c64c72f1746ec4cf67e.zip | |
Fix is_private check in mentions array handling.
Diffstat (limited to 'discord/message.py')
| -rw-r--r-- | discord/message.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py index 1822f4cb..209c1419 100644 --- a/discord/message.py +++ b/discord/message.py @@ -99,7 +99,10 @@ class Message(object): def _handle_mentions(self, mentions): self.mentions = [] - if self.channel is not None and not self.channel.is_private: + if getattr(self.channel, 'is_private', True): + return + + if self.channel is not None: for mention in mentions: id_search = mention.get('id') member = utils.find(lambda m: m.id == id_search, self.server.members) |