PollAnswerBuilder

export declare class PollAnswerBuilder
export declare class PollAnswerBuilder

No summary provided.

constructor(data?)
Creates a new poll answer from API data.
NameTypeOptionalDescription
dataPartial<Omit<APIPollAnswer, 'answer_id'>>YesThe API data to create this poll answer with
ProtectedReadonly
The API data associated with this poll answer.
setMedia(options):this
Sets the media for this poll answer.
NameTypeOptionalDescription
optionsAPIPollMedia | PollAnswerMediaBuilder | ((builder: PollAnswerMediaBuilder) => PollAnswerMediaBuilder)NoThe data to use for this poll answer's media
toJSON(validationOverride?):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.
NameTypeOptionalDescription
validationOverridebooleanYesForce validation to run/not run regardless of your global preference
updateMedia(updater):this
Updates the media of this poll answer.
NameTypeOptionalDescription
updater(builder: PollAnswerMediaBuilder) => voidNoThe function to update the media with