MessageMediaPoll
- class pyrogram.raw.types.MessageMediaPoll
Poll
Constructor of
MessageMedia.- Details:
Layer:
223ID:
4BD6E798
- Parameters:
poll (
Poll) – The pollresults (
PollResults) – The results of the poll
- Functions:
This object can be returned by 2 functions.
Upload a file and associate it to a chat (without actually sending it to the chat)
Upload a media file associated with an imported chat, click here for more info ».
TL Schema
messageMediaPoll#4bd6e798
poll:Poll
results:PollResults
= MessageMedia
Parameter Tree
MessageMediaPoll
├── poll →
Poll│ └──
Poll│ ├── id →
long│ ├── closed →
true (optional)│ ├── public_voters →
true (optional)│ ├── multiple_choice →
true (optional)│ ├── quiz →
true (optional)│ ├── question →
TextWithEntities│ │ └──
TextWithEntities│ │ ├── text →
string│ │ └── entities →
Vector < MessageEntity >│ │ ├──
MessageEntityUnknown│ │ ├──
MessageEntityMention│ │ ├──
MessageEntityHashtag│ │ ├──
MessageEntityBotCommand│ │ ├──
MessageEntityUrl│ │ ├──
MessageEntityEmail│ │ ├──
MessageEntityBold│ │ ├──
MessageEntityItalic│ │ ├──
MessageEntityCode│ │ ├──
MessageEntityPre│ │ ├──
MessageEntityTextUrl│ │ ├──
MessageEntityMentionName│ │ ├──
InputMessageEntityMentionName│ │ ├──
MessageEntityPhone│ │ ├──
MessageEntityCashtag│ │ ├──
MessageEntityUnderline│ │ ├──
MessageEntityStrike│ │ ├──
MessageEntityBankCard│ │ ├──
MessageEntitySpoiler│ │ ├──
MessageEntityCustomEmoji│ │ ├──
MessageEntityBlockquote│ │ └──
MessageEntityFormattedDate│ ├── answers →
Vector < PollAnswer >│ │ └──
PollAnswer│ │ ├── text →
TextWithEntities│ │ │ └──
TextWithEntities│ │ └── option →
bytes│ ├── close_period →
int (optional)│ └── close_date →
int (optional)└── results →
PollResults└──
PollResults├── min →
true (optional)├── results →
Vector < PollAnswerVoters > (optional)│ └──
PollAnswerVoters│ ├── chosen →
true (optional)│ ├── correct →
true (optional)│ ├── option →
bytes│ └── voters →
int├── total_voters →
int (optional)├── recent_voters →
Vector < Peer > (optional)│ ├──
PeerUser│ │ └── user_id →
long│ ├──
PeerChat│ │ └── chat_id →
long│ └──
PeerChannel│ └── channel_id →
long├── solution →
string (optional)└── solution_entities →
Vector < MessageEntity > (optional)│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int├──
MessageEntityUrl│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int├──
MessageEntityPre│ ├── offset →
int│ ├── length →
int│ └── language →
string│ ├── offset →
int│ ├── length →
int│ └── url →
string│ ├── offset →
int│ ├── length →
int│ └── user_id →
long│ ├── offset →
int│ ├── length →
int│ └── user_id →
InputUser│ ├──
InputUserEmpty│ ├──
InputUserSelf│ ├──
InputUser│ └──
InputUserFromMessage│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ └── length →
int│ ├── offset →
int│ ├── length →
int│ └── document_id →
long│ ├── collapsed →
true (optional)│ ├── offset →
int│ └── length →
int├── relative →
true (optional)├── short_time →
true (optional)├── long_time →
true (optional)├── short_date →
true (optional)├── long_date →
true (optional)├── day_of_week →
true (optional)├── offset →
int├── length →
int└── date →
intExample
MessageMediaPoll(
poll=Poll(
id=0,
question=TextWithEntities(
text="Open",
entities=[
MessageEntityUnknown(
offset=0,
length=0
)
]
),
answers=[
PollAnswer(
text=TextWithEntities(
text="Open",
entities=[
MessageEntityUnknown(
offset=0,
length=0
)
]
),
option=b"data"
)
]
),
results=PollResults(),
)