class PollQuestionBuilder

export declare class PollQuestionBuilder extends PollMediaBuilder

A builder that creates API-compatible JSON data for a poll question.

protectedreadonly
data : Partial<APIPollMedia>

The API data associated with this poll media.

Inherited from: PollMediaBuilder

setText(
text: string
) : this

Sets the text for this poll media.

Inherited from: PollMediaBuilder

toJSON(
validationOverride?: boolean
) : 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.