messages.AddPollAnswer

class pyrogram.raw.functions.messages.AddPollAnswer

Telegram API function.

Details:
  • Layer: 224

  • ID: 19BC4B6D

Parameters:
Returns:

Updates

TL Schema

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

= Updates

Parameter Tree

AddPollAnswer
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── msg_idint
└── answerPollAnswer
├── PollAnswer
│ ├── textTextWithEntities
│ │ └── TextWithEntities
│ │ ├── textstring
│ │ └── entitiesVector < 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
│ ├── optionbytes
│ ├── mediaMessageMedia (optional)
│ │ ├── MessageMediaEmpty
│ │ ├── MessageMediaPhoto
│ │ │ ├── spoilertrue (optional)
│ │ │ ├── live_phototrue (optional)
│ │ │ ├── photoPhoto (optional)
│ │ │ │ ├── PhotoEmpty
│ │ │ │ └── Photo
│ │ │ ├── ttl_secondsint (optional)
│ │ │ └── videoDocument (optional)
│ │ │ ├── DocumentEmpty
│ │ │ └── Document
│ │ ├── MessageMediaGeo
│ │ │ └── geoGeoPoint
│ │ │ ├── GeoPointEmpty
│ │ │ └── GeoPoint
│ │ ├── MessageMediaContact
│ │ │ ├── phone_numberstring
│ │ │ ├── first_namestring
│ │ │ ├── last_namestring
│ │ │ ├── vcardstring
│ │ │ └── user_idlong
│ │ ├── MessageMediaUnsupported
│ │ ├── MessageMediaDocument
│ │ │ ├── nopremiumtrue (optional)
│ │ │ ├── spoilertrue (optional)
│ │ │ ├── videotrue (optional)
│ │ │ ├── roundtrue (optional)
│ │ │ ├── voicetrue (optional)
│ │ │ ├── documentDocument (optional)
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ ├── alt_documentsVector < Document > (optional)
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ ├── video_coverPhoto (optional)
│ │ │ │ ├── PhotoEmpty
│ │ │ │ └── Photo
│ │ │ ├── video_timestampint (optional)
│ │ │ └── ttl_secondsint (optional)
│ │ ├── MessageMediaWebPage
│ │ │ ├── force_large_mediatrue (optional)
│ │ │ ├── force_small_mediatrue (optional)
│ │ │ ├── manualtrue (optional)
│ │ │ ├── safetrue (optional)
│ │ │ └── webpageWebPage
│ │ │ ├── WebPageEmpty
│ │ │ ├── WebPagePending
│ │ │ ├── WebPage
│ │ │ └── WebPageNotModified
│ │ ├── MessageMediaVenue
│ │ │ ├── geoGeoPoint
│ │ │ │ ├── GeoPointEmpty
│ │ │ │ └── GeoPoint
│ │ │ ├── titlestring
│ │ │ ├── addressstring
│ │ │ ├── providerstring
│ │ │ ├── venue_idstring
│ │ │ └── venue_typestring
│ │ ├── MessageMediaGame
│ │ │ └── gameGame
│ │ │ └── Game
│ │ ├── MessageMediaInvoice
│ │ │ ├── shipping_address_requestedtrue (optional)
│ │ │ ├── testtrue (optional)
│ │ │ ├── titlestring
│ │ │ ├── descriptionstring
│ │ │ ├── photoWebDocument (optional)
│ │ │ │ ├── WebDocument
│ │ │ │ └── WebDocumentNoProxy
│ │ │ ├── receipt_msg_idint (optional)
│ │ │ ├── currencystring
│ │ │ ├── total_amountlong
│ │ │ ├── start_paramstring
│ │ │ └── extended_mediaMessageExtendedMedia (optional)
│ │ │ ├── MessageExtendedMediaPreview
│ │ │ └── MessageExtendedMedia
│ │ ├── MessageMediaGeoLive
│ │ │ ├── geoGeoPoint
│ │ │ │ ├── GeoPointEmpty
│ │ │ │ └── GeoPoint
│ │ │ ├── headingint (optional)
│ │ │ ├── periodint
│ │ │ └── proximity_notification_radiusint (optional)
│ │ ├── MessageMediaPoll
│ │ │ ├── pollPoll
│ │ │ │ └── Poll
│ │ │ ├── resultsPollResults
│ │ │ │ └── PollResults
│ │ │ └── attached_mediaMessageMedia (optional)
│ │ │ ├── MessageMediaEmpty
│ │ │ ├── MessageMediaPhoto
│ │ │ ├── MessageMediaGeo
│ │ │ ├── MessageMediaContact
│ │ │ ├── MessageMediaUnsupported
│ │ │ ├── MessageMediaDocument
│ │ │ ├── MessageMediaWebPage
│ │ │ ├── MessageMediaVenue
│ │ │ ├── MessageMediaGame
│ │ │ ├── MessageMediaInvoice
│ │ │ ├── MessageMediaGeoLive
│ │ │ ├── MessageMediaPoll
│ │ │ ├── MessageMediaDice
│ │ │ ├── MessageMediaStory
│ │ │ ├── MessageMediaGiveaway
│ │ │ ├── MessageMediaGiveawayResults
│ │ │ ├── MessageMediaPaidMedia
│ │ │ ├── MessageMediaToDo
│ │ │ └── MessageMediaVideoStream
│ │ ├── MessageMediaDice
│ │ │ ├── valueint
│ │ │ ├── emoticonstring
│ │ │ └── game_outcomemessages.EmojiGameOutcome (optional)
│ │ │ └── messages.EmojiGameOutcome
│ │ ├── MessageMediaStory
│ │ │ ├── via_mentiontrue (optional)
│ │ │ ├── peerPeer
│ │ │ │ ├── PeerUser
│ │ │ │ ├── PeerChat
│ │ │ │ └── PeerChannel
│ │ │ ├── idint
│ │ │ └── storyStoryItem (optional)
│ │ │ ├── StoryItemDeleted
│ │ │ ├── StoryItemSkipped
│ │ │ └── StoryItem
│ │ ├── MessageMediaGiveaway
│ │ │ ├── only_new_subscriberstrue (optional)
│ │ │ ├── winners_are_visibletrue (optional)
│ │ │ ├── channelsVector < long >
│ │ │ ├── countries_iso2Vector < string > (optional)
│ │ │ ├── prize_descriptionstring (optional)
│ │ │ ├── quantityint
│ │ │ ├── monthsint (optional)
│ │ │ ├── starslong (optional)
│ │ │ └── until_dateint
│ │ ├── MessageMediaGiveawayResults
│ │ │ ├── only_new_subscriberstrue (optional)
│ │ │ ├── refundedtrue (optional)
│ │ │ ├── channel_idlong
│ │ │ ├── additional_peers_countint (optional)
│ │ │ ├── launch_msg_idint
│ │ │ ├── winners_countint
│ │ │ ├── unclaimed_countint
│ │ │ ├── winnersVector < long >
│ │ │ ├── monthsint (optional)
│ │ │ ├── starslong (optional)
│ │ │ ├── prize_descriptionstring (optional)
│ │ │ └── until_dateint
│ │ ├── MessageMediaPaidMedia
│ │ │ ├── stars_amountlong
│ │ │ └── extended_mediaVector < MessageExtendedMedia >
│ │ │ ├── MessageExtendedMediaPreview
│ │ │ └── MessageExtendedMedia
│ │ ├── MessageMediaToDo
│ │ │ ├── todoTodoList
│ │ │ │ └── TodoList
│ │ │ └── completionsVector < TodoCompletion > (optional)
│ │ │ └── TodoCompletion
│ │ └── MessageMediaVideoStream
│ │ ├── rtmp_streamtrue (optional)
│ │ └── callInputGroupCall
│ │ ├── InputGroupCall
│ │ ├── InputGroupCallSlug
│ │ └── InputGroupCallInviteMessage
│ ├── added_byPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ └── dateint (optional)
└── InputPollAnswer
├── textTextWithEntities
│ └── TextWithEntities
│ ├── textstring
│ └── entitiesVector < MessageEntity >
│ ├── MessageEntityUnknown
│ ├── MessageEntityMention
│ ├── MessageEntityHashtag
│ ├── MessageEntityUrl
│ ├── MessageEntityEmail
│ ├── MessageEntityBold
│ ├── MessageEntityItalic
│ ├── MessageEntityCode
│ ├── MessageEntityPre
│ ├── MessageEntityTextUrl
│ ├── MessageEntityPhone
│ ├── MessageEntityCashtag
│ ├── MessageEntityStrike
│ ├── MessageEntityBankCard
│ ├── MessageEntitySpoiler
└── mediaInputMedia (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
        ),
    )
)