PollQuestionBuilder

export declare class PollQuestionBuilder extends PollMediaBuilder
export declare class PollQuestionBuilder extends PollMediaBuilder
A builder that creates API-compatible JSON data for a poll question.
ProtectedReadonly
The API data associated with this poll media.
Inherited from PollMediaBuilder
setText(text):this
Sets the text for this poll media.
NameTypeOptionalDescription
textstringNo
The text to use
Inherited from PollMediaBuilder
toJSON(validationOverride?):Omit<APIPollMedia, 'emoji'>
Serializes this builder to API-compatible JSON data.
Note that by disabling validation, there is no guarantee that the resulting object will be valid.
NameTypeOptionalDescription
validationOverridebooleanYes
Force validation to run/not run regardless of your global preference