Abstract

PollMediaBuilder

export declare abstract class PollMediaBuilder
export declare abstract class PollMediaBuilder
The base poll media builder that contains common symbols for poll media builders.
constructor(data?)
Creates new poll media from API data.
NameTypeOptionalDescription
dataPartial<APIPollMedia>YesThe API data to use
ProtectedReadonly
The API data associated with this poll media.
setText(text):this
Sets the text for this poll media.
NameTypeOptionalDescription
textstringNoThe text to use
Abstract
toJSON(validationOverride?):APIPollMedia
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