def _remove_reaction(self, data: MessageReactionRemoveEvent, emoji: EmojiInputType, user_id: int) -> Reaction:
    reaction = utils.find((lambda r: (r.emoji == emoji)), self.reactions)
    if (reaction is None):
        raise ValueError('Emoji already removed?')
    reaction.count -= 1
    if (user_id == self._state.self_id):
        reaction.me = False
    if (reaction.count == 0):
        self.reactions.remove(reaction)
    return reaction
def _remove_reaction(self, data: MessageReactionRemoveEvent, emoji: EmojiInputType, user_id: int) -> Reaction:
    reaction = utils.find((lambda r: (r.emoji == emoji)), self.reactions)
    if (reaction is None):
        raise ValueError('Emoji already removed?')
    reaction.count -= 1
    if (user_id == self._state.self_id):
        reaction.me = False
    if (reaction.count == 0):
        self.reactions.remove(reaction)
    return reaction