TDLib
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
inputPollTypeQuiz Class Referencefinal

Inherits InputPollType.

Description

A poll in quiz mode, which has predefined correct answers.

Public Member Functions

 inputPollTypeQuiz ()
 
 inputPollTypeQuiz (array< int32 > &&correct_option_ids_, object_ptr< formattedText > &&explanation_, object_ptr< InputPollMedia > &&explanation_media_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
 
TlObject & operator= (TlObject &&)=default
 
virtual void store (TlStorerCalcLength &s) const
 
virtual void store (TlStorerUnsafe &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Public Attributes

array< int32 > correct_option_ids_
 Increasing list of 0-based identifiers of the correct answer options; must be non-empty.
 
object_ptr< formattedText > explanation_
 Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds.
 
object_ptr< InputPollMedia > explanation_media_
 Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; pass null if none. Must be one of the following types: inputPollMediaAnimation, inputPollMediaAudio, inputPollMediaDocument, inputPollMediaLocation, inputPollMediaPhoto, inputPollMediaVenue, or inputPollMediaVideo without caption.
 

Static Public Attributes

static const std::int32_t ID = -747018378
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ inputPollTypeQuiz() [1/2]

A poll in quiz mode, which has predefined correct answers.

◆ inputPollTypeQuiz() [2/2]

inputPollTypeQuiz ( array< int32 > &&  correct_option_ids_,
object_ptr< formattedText > &&  explanation_,
object_ptr< InputPollMedia > &&  explanation_media_ 
)

A poll in quiz mode, which has predefined correct answers.

Parameters
[in]correct_option_ids_Increasing list of 0-based identifiers of the correct answer options; must be non-empty.
[in]explanation_Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds.
[in]explanation_media_Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; pass null if none. Must be one of the following types: inputPollMediaAnimation, inputPollMediaAudio, inputPollMediaDocument, inputPollMediaLocation, inputPollMediaPhoto, inputPollMediaVenue, or inputPollMediaVideo without caption.

Member Function Documentation

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: