aboutsummaryrefslogtreecommitdiff
path: root/discord/message.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-11-19 22:20:07 -0500
committerRapptz <[email protected]>2015-11-19 22:21:15 -0500
commite88c194e9af044af25020c64c72f1746ec4cf67e (patch)
tree2b03b5f4cb474a6513abd89654eaa8b1d4078c3d /discord/message.py
parentFix ordering issue with Message.server (diff)
downloaddiscord.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.py5
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)