Browse Source

Make Message.channel_mentions unique.

pull/258/head
Rapptz 9 years ago
parent
commit
01a46f0612
  1. 6
      discord/message.py

6
discord/message.py

@ -146,10 +146,8 @@ class Message:
self.mentions.append(member)
if self.server is not None:
for mention in self.raw_channel_mentions:
channel = self.server.get_channel(mention)
if channel is not None:
self.channel_mentions.append(channel)
it = filter(None, map(lambda m: self.server.get_channel(m), self.raw_channel_mentions))
self.channel_mentions = utils._unique(it)
for role_id in role_mentions:
role = utils.get(self.server.roles, id=role_id)

Loading…
Cancel
Save