Filter null mentions when creating a Message.
This commit is contained in:
parent
56650ae7c2
commit
60f0b22cbb
@ -300,7 +300,7 @@ class Message:
|
|||||||
self.mentions = [self._state.store_user(m) for m in mentions]
|
self.mentions = [self._state.store_user(m) for m in mentions]
|
||||||
return
|
return
|
||||||
|
|
||||||
for mention in mentions:
|
for mention in filter(None, mentions):
|
||||||
id_search = int(mention['id'])
|
id_search = int(mention['id'])
|
||||||
member = self.guild.get_member(id_search)
|
member = self.guild.get_member(id_search)
|
||||||
if member is not None:
|
if member is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user