class PollAnswerBuilder

implements

JSONEncodable<Omit<APIPollAnswer, 'answer_id'>>
export declare class PollAnswerBuilder implements JSONEncodable<Omit<APIPollAnswer, 'answer_id'>>

Constructors

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

Creates a new poll answer from API data.

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.