mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Add chosen_order to Reaction
This commit is contained in:
parent
9f94aee9f8
commit
53584bc1db
@ -35,6 +35,10 @@ class Reaction(Object):
|
|||||||
|
|
||||||
count (``int``, *optional*):
|
count (``int``, *optional*):
|
||||||
Reaction count.
|
Reaction count.
|
||||||
|
|
||||||
|
chosen_order (``int``, *optional*):
|
||||||
|
Chosen reaction order.
|
||||||
|
Available for chosen reactions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -43,13 +47,15 @@ class Reaction(Object):
|
|||||||
client: "pyrogram.Client" = None,
|
client: "pyrogram.Client" = None,
|
||||||
emoji: Optional[str] = None,
|
emoji: Optional[str] = None,
|
||||||
custom_emoji_id: Optional[int] = None,
|
custom_emoji_id: Optional[int] = None,
|
||||||
count: Optional[int] = None
|
count: Optional[int] = None,
|
||||||
|
chosen_order: Optional[int] = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
self.emoji = emoji
|
self.emoji = emoji
|
||||||
self.custom_emoji_id = custom_emoji_id
|
self.custom_emoji_id = custom_emoji_id
|
||||||
self.count = count
|
self.count = count
|
||||||
|
self.chosen_order = chosen_order
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _parse(
|
def _parse(
|
||||||
@ -75,5 +81,6 @@ class Reaction(Object):
|
|||||||
) -> "Reaction":
|
) -> "Reaction":
|
||||||
reaction = Reaction._parse(client, reaction_count.reaction)
|
reaction = Reaction._parse(client, reaction_count.reaction)
|
||||||
reaction.count = reaction_count.count
|
reaction.count = reaction_count.count
|
||||||
|
reaction.chosen_order = reaction_count.chosen_order
|
||||||
|
|
||||||
return reaction
|
return reaction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user