Add chosen_order to Reaction

This commit is contained in:
Dan 2022-09-18 15:44:18 +02:00
parent 9f94aee9f8
commit 53584bc1db

View File

@ -35,6 +35,10 @@ class Reaction(Object):
count (``int``, *optional*):
Reaction count.
chosen_order (``int``, *optional*):
Chosen reaction order.
Available for chosen reactions.
"""
def __init__(
@ -43,13 +47,15 @@ class Reaction(Object):
client: "pyrogram.Client" = None,
emoji: Optional[str] = None,
custom_emoji_id: Optional[int] = None,
count: Optional[int] = None
count: Optional[int] = None,
chosen_order: Optional[int] = None
):
super().__init__(client)
self.emoji = emoji
self.custom_emoji_id = custom_emoji_id
self.count = count
self.chosen_order = chosen_order
@staticmethod
def _parse(
@ -75,5 +81,6 @@ class Reaction(Object):
) -> "Reaction":
reaction = Reaction._parse(client, reaction_count.reaction)
reaction.count = reaction_count.count
reaction.chosen_order = reaction_count.chosen_order
return reaction