messages.AddPollAnswer

class pyrogram.raw.functions.messages.AddPollAnswer

Telegram API function.

Details:
  • Layer: 227

  • ID: 19BC4B6D

Parameters:
Returns:

Updates

TL Schema

messages.addPollAnswer#19bc4b6d
peer:InputPeer
msg_id:int
answer:PollAnswer

= Updates

Parameter Tree

AddPollAnswer
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── msg_id → int
└── answer → PollAnswer
├── PollAnswer
│ ├── text → TextWithEntities
│ │ └── TextWithEntities
│ │ ├── text → string
│ │ └── entities → Vector < MessageEntity >
│ │ ├── MessageEntityUnknown
│ │ ├── MessageEntityMention
│ │ ├── MessageEntityHashtag
│ │ ├── MessageEntityBotCommand
│ │ ├── MessageEntityUrl
│ │ ├── MessageEntityEmail
│ │ ├── MessageEntityBold
│ │ ├── MessageEntityItalic
│ │ ├── MessageEntityCode
│ │ ├── MessageEntityPre
│ │ ├── MessageEntityTextUrl
│ │ ├── MessageEntityMentionName
│ │ ├── MessageEntityPhone
│ │ ├── MessageEntityCashtag
│ │ ├── MessageEntityUnderline
│ │ ├── MessageEntityStrike
│ │ ├── MessageEntityBankCard
│ │ ├── MessageEntitySpoiler
│ │ ├── MessageEntityCustomEmoji
│ │ ├── MessageEntityBlockquote
│ │ ├── MessageEntityFormattedDate
│ │ ├── MessageEntityDiffInsert
│ │ ├── MessageEntityDiffReplace
│ │ └── MessageEntityDiffDelete
│ ├── option → bytes
│ ├── media → MessageMedia (optional)
│ │ ├── MessageMediaEmpty
│ │ ├── MessageMediaPhoto
│ │ │ ├── spoiler → true (optional)
│ │ │ ├── live_photo → true (optional)
│ │ │ ├── photo → Photo (optional)
│ │ │ │ ├── PhotoEmpty
│ │ │ │ └── Photo
│ │ │ ├── ttl_seconds → int (optional)
│ │ │ └── video → Document (optional)
│ │ │ ├── DocumentEmpty
│ │ │ └── Document
│ │ ├── MessageMediaGeo
│ │ │ └── geo → GeoPoint
│ │ │ ├── GeoPointEmpty
│ │ │ └── GeoPoint
│ │ ├── MessageMediaContact
│ │ │ ├── phone_number → string
│ │ │ ├── first_name → string
│ │ │ ├── last_name → string
│ │ │ ├── vcard → string
│ │ │ └── user_id → long
│ │ ├── MessageMediaUnsupported
│ │ ├── MessageMediaDocument
│ │ │ ├── nopremium → true (optional)
│ │ │ ├── spoiler → true (optional)
│ │ │ ├── video → true (optional)
│ │ │ ├── round → true (optional)
│ │ │ ├── voice → true (optional)
│ │ │ ├── document → Document (optional)
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ ├── alt_documents → Vector < Document > (optional)
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ ├── video_cover → Photo (optional)
│ │ │ │ ├── PhotoEmpty
│ │ │ │ └── Photo
│ │ │ ├── video_timestamp → int (optional)
│ │ │ └── ttl_seconds → int (optional)
│ │ ├── MessageMediaWebPage
│ │ │ ├── force_large_media → true (optional)
│ │ │ ├── force_small_media → true (optional)
│ │ │ ├── manual → true (optional)
│ │ │ ├── safe → true (optional)
│ │ │ └── webpage → WebPage
│ │ │ ├── WebPageEmpty
│ │ │ ├── WebPagePending
│ │ │ ├── WebPage
│ │ │ └── WebPageNotModified
│ │ ├── MessageMediaVenue
│ │ │ ├── geo → GeoPoint
│ │ │ │ ├── GeoPointEmpty
│ │ │ │ └── GeoPoint
│ │ │ ├── title → string
│ │ │ ├── address → string
│ │ │ ├── provider → string
│ │ │ ├── venue_id → string
│ │ │ └── venue_type → string
│ │ ├── MessageMediaGame
│ │ │ └── game → Game
│ │ │ └── Game
│ │ ├── MessageMediaInvoice
│ │ │ ├── shipping_address_requested → true (optional)
│ │ │ ├── test → true (optional)
│ │ │ ├── title → string
│ │ │ ├── description → string
│ │ │ ├── photo → WebDocument (optional)
│ │ │ │ ├── WebDocument
│ │ │ │ └── WebDocumentNoProxy
│ │ │ ├── receipt_msg_id → int (optional)
│ │ │ ├── currency → string
│ │ │ ├── total_amount → long
│ │ │ ├── start_param → string
│ │ │ └── extended_media → MessageExtendedMedia (optional)
│ │ │ ├── MessageExtendedMediaPreview
│ │ │ └── MessageExtendedMedia
│ │ ├── MessageMediaGeoLive
│ │ │ ├── geo → GeoPoint
│ │ │ │ ├── GeoPointEmpty
│ │ │ │ └── GeoPoint
│ │ │ ├── heading → int (optional)
│ │ │ ├── period → int
│ │ │ └── proximity_notification_radius → int (optional)
│ │ ├── MessageMediaPoll
│ │ │ ├── poll → Poll
│ │ │ │ └── Poll
│ │ │ ├── results → PollResults
│ │ │ │ └── PollResults
│ │ │ └── attached_media → MessageMedia (optional)
│ │ │ ├── MessageMediaEmpty
│ │ │ ├── MessageMediaPhoto
│ │ │ ├── MessageMediaGeo
│ │ │ ├── MessageMediaContact
│ │ │ ├── MessageMediaUnsupported
│ │ │ ├── MessageMediaDocument
│ │ │ ├── MessageMediaWebPage
│ │ │ ├── MessageMediaVenue
│ │ │ ├── MessageMediaGame
│ │ │ ├── MessageMediaInvoice
│ │ │ ├── MessageMediaGeoLive
│ │ │ ├── MessageMediaPoll
│ │ │ ├── MessageMediaDice
│ │ │ ├── MessageMediaStory
│ │ │ ├── MessageMediaGiveaway
│ │ │ ├── MessageMediaGiveawayResults
│ │ │ ├── MessageMediaPaidMedia
│ │ │ ├── MessageMediaToDo
│ │ │ └── MessageMediaVideoStream
│ │ ├── MessageMediaDice
│ │ │ ├── value → int
│ │ │ ├── emoticon → string
│ │ │ └── game_outcome → messages.EmojiGameOutcome (optional)
│ │ │ └── messages.EmojiGameOutcome
│ │ ├── MessageMediaStory
│ │ │ ├── via_mention → true (optional)
│ │ │ ├── peer → Peer
│ │ │ │ ├── PeerUser
│ │ │ │ ├── PeerChat
│ │ │ │ └── PeerChannel
│ │ │ ├── id → int
│ │ │ └── story → StoryItem (optional)
│ │ │ ├── StoryItemDeleted
│ │ │ ├── StoryItemSkipped
│ │ │ └── StoryItem
│ │ ├── MessageMediaGiveaway
│ │ │ ├── only_new_subscribers → true (optional)
│ │ │ ├── winners_are_visible → true (optional)
│ │ │ ├── channels → Vector < long >
│ │ │ ├── countries_iso2 → Vector < string > (optional)
│ │ │ ├── prize_description → string (optional)
│ │ │ ├── quantity → int
│ │ │ ├── months → int (optional)
│ │ │ ├── stars → long (optional)
│ │ │ └── until_date → int
│ │ ├── MessageMediaGiveawayResults
│ │ │ ├── only_new_subscribers → true (optional)
│ │ │ ├── refunded → true (optional)
│ │ │ ├── channel_id → long
│ │ │ ├── additional_peers_count → int (optional)
│ │ │ ├── launch_msg_id → int
│ │ │ ├── winners_count → int
│ │ │ ├── unclaimed_count → int
│ │ │ ├── winners → Vector < long >
│ │ │ ├── months → int (optional)
│ │ │ ├── stars → long (optional)
│ │ │ ├── prize_description → string (optional)
│ │ │ └── until_date → int
│ │ ├── MessageMediaPaidMedia
│ │ │ ├── stars_amount → long
│ │ │ └── extended_media → Vector < MessageExtendedMedia >
│ │ │ ├── MessageExtendedMediaPreview
│ │ │ └── MessageExtendedMedia
│ │ ├── MessageMediaToDo
│ │ │ ├── todo → TodoList
│ │ │ │ └── TodoList
│ │ │ └── completions → Vector < TodoCompletion > (optional)
│ │ │ └── TodoCompletion
│ │ └── MessageMediaVideoStream
│ │ ├── rtmp_stream → true (optional)
│ │ └── call → InputGroupCall
│ │ ├── InputGroupCall
│ │ ├── InputGroupCallSlug
│ │ └── InputGroupCallInviteMessage
│ ├── added_by → Peer (optional)
│ │ ├── PeerUser
│ │ │ └── user_id → long
│ │ ├── PeerChat
│ │ │ └── chat_id → long
│ │ └── PeerChannel
│ │ └── channel_id → long
│ └── date → int (optional)
└── InputPollAnswer
├── text → TextWithEntities
│ └── TextWithEntities
│ ├── text → string
│ └── entities → Vector < MessageEntity >
│ ├── MessageEntityUnknown
│ ├── MessageEntityMention
│ ├── MessageEntityHashtag
│ ├── MessageEntityUrl
│ ├── MessageEntityEmail
│ ├── MessageEntityBold
│ ├── MessageEntityItalic
│ ├── MessageEntityCode
│ ├── MessageEntityPre
│ ├── MessageEntityTextUrl
│ ├── MessageEntityPhone
│ ├── MessageEntityCashtag
│ ├── MessageEntityStrike
│ ├── MessageEntityBankCard
│ ├── MessageEntitySpoiler
└── media → InputMedia (optional)

Example

await app.invoke(
    AddPollAnswer(
        peer=await app.resolve_peer(chat_id),
        msg_id=0,
        answer=PollAnswer(
            text=TextWithEntities(
                text="Open",
                entities=[
                        MessageEntityUnknown(
                            offset=0,
                            length=0
                        )
                    ]
            ),
            option=b"data",
            media=None,
            added_by=None,
            date=None
        ),
    )
)