Layer 227
InputMediaPoll
A poll
constructor
inputMediaPoll#f94e5f1 flags:# poll:Poll correct_answers:flags.0?Vector<bytes> solution:flags.1?string solution_entities:flags.1?Vector<MessageEntity> = InputMedia;
Parameters
| Name | Type | Description |
|---|---|---|
| Poll | Poll | The poll to send |
| CorrectAnswers | flags .0? Vector < int > | 0-based indices of the correct answers in the answers vector (for quiz polls) |
| AttachedMedia | flags .3? InputMedia | Optional media attachment to display alongside the poll |
| Solution | flags .1? string | Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds. |
| SolutionEntities | flags .1? Vector < MessageEntity > | Styled text message entities for the solution explanation. |
| SolutionMedia | flags .2? InputMedia | Optional media attachment shown alongside the quiz solution explanation |
Returns
InputMediaGogram Example
// Creating InputMediaPoll constructor obj := &tg.InputMediaPoll{ Poll: &tg.Poll{}, CorrectAnswers: nil, AttachedMedia: nil, Solution: "Hello, World!", SolutionEntities: nil, SolutionMedia: nil, }