class PollAnswerBuilder

export declare class PollAnswerBuilder

Constructors

constructor(
data?: Partial<Omit<APIPollAnswer, 'answer_id'>>
)

Creates a new poll answer from API data.

protectedreadonly
data : PollAnswerData

The API data associated with this poll answer.

Sets the media for this poll answer.

toJSON(
validationOverride?: boolean
) : Omit<APIPollAnswer, 'answer_id'>

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.

updateMedia(
updater: (builder: PollAnswerMediaBuilder) => void
) : this

Updates the media of this poll answer.