mirror of https://gitlab.com/litecord/litecord.git
pubsub.lazy_guild: use filter instead of genexpr
This commit is contained in:
parent
773ab8fd18
commit
e1a946eb87
|
|
@ -393,9 +393,11 @@ class GuildMemberList:
|
||||||
}
|
}
|
||||||
|
|
||||||
states = map(self.get_state, session_ids)
|
states = map(self.get_state, session_ids)
|
||||||
|
states = filter(lambda state: state is not None, states)
|
||||||
|
|
||||||
dispatched = []
|
dispatched = []
|
||||||
|
|
||||||
for state in (s for s in states if s is not None):
|
for state in states:
|
||||||
await state.ws.dispatch(
|
await state.ws.dispatch(
|
||||||
'GUILD_MEMBER_LIST_UPDATE', payload)
|
'GUILD_MEMBER_LIST_UPDATE', payload)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue