peyk.platforms.telegram.types.poll_answer¶
Classes
|
This object represents an answer of a user in a non-anonymous poll. |
- class peyk.platforms.telegram.types.poll_answer.PollAnswer(poll_id: str, voter_chat: Chat | None = None, user: User | None = None, option_ids: List[int] | None = None, option_persistent_ids: List[str] | None = None)[source]¶
Bases:
objectThis object represents an answer of a user in a non-anonymous poll.
- Variables:
poll_id (str) – Unique poll identifier
option_ids (List[int] | None) – 0-based identifiers of chosen answer options. May be empty if the vote was retracted.
option_persistent_ids (List[str] | None) – Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.
voter_chat (peyk.platforms.telegram.types.chat.Chat | None) – The chat that changed the answer to the poll, if the voter is anonymous
user (peyk.platforms.telegram.types.user.User | None) – The user that changed the answer to the poll, if the voter isn’t anonymous
- poll_id: str¶
- option_ids: List[int] | None = None¶
- option_persistent_ids: List[str] | None = None¶
- classmethod from_dict(data: dict | None) PollAnswer | None[source]¶
Parse a Telegram API mapping into this type.
- Parameters:
data – Raw Telegram API mapping, or
None.- Returns:
Parsed type instance, or
NonewhendataisNone.