diff options
| author | Rapptz <[email protected]> | 2018-04-20 00:32:23 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-04-20 00:32:23 -0400 |
| commit | 60f0b22cbb0d603cdad4117df2cfc7c84c9e9e40 (patch) | |
| tree | df0da9e28ead31a9b77fe805265690c0b2d77e67 | |
| parent | Change raw events to use slotted data models instead of parameters. (diff) | |
| download | discord.py-60f0b22cbb0d603cdad4117df2cfc7c84c9e9e40.tar.xz discord.py-60f0b22cbb0d603cdad4117df2cfc7c84c9e9e40.zip | |
Filter null mentions when creating a Message.
| -rw-r--r-- | discord/message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py index 68842a11..e16cc920 100644 --- a/discord/message.py +++ b/discord/message.py @@ -300,7 +300,7 @@ class Message: self.mentions = [self._state.store_user(m) for m in mentions] return - for mention in mentions: + for mention in filter(None, mentions): id_search = int(mention['id']) member = self.guild.get_member(id_search) if member is not None: |