def _handle_mentions(self, mentions: List[UserWithMemberPayload]) -> None:
    self.mentions = r = []
    guild = self.guild
    state = self._state
    if (not isinstance(guild, Guild)):
        self.mentions = [state.store_user(m) for m in mentions]
        return
    for mention in filter(None, mentions):
        id_search = int(mention['id'])
        member = guild.get_member(id_search)
        if (member is not None):
            r.append(member)
        else:
            r.append(Member._try_upgrade(data=mention, guild=guild, state=state))
def _handle_mentions(self, mentions: List[UserWithMemberPayload]) -> None:
    self.mentions = r = []
    guild = self.guild
    state = self._state
    if (not isinstance(guild, Guild)):
        self.mentions = [state.store_user(m) for m in mentions]
        return
    for mention in filter(None, mentions):
        id_search = int(mention['id'])
        member = guild.get_member(id_search)
        if (member is not None):
            r.append(member)
        else:
            r.append(Member._try_upgrade(data=mention, guild=guild, state=state))