class MessageReferenceBuilder
implements
JSONEncodable<RESTAPIMessageReference>export declare class MessageReferenceBuilder implements JSONEncodable<RESTAPIMessageReference>A builder that creates API-compatible JSON data for message references.
Constructors
constructor(data?: Partial<RESTAPIMessageReference>)
data?: Partial<RESTAPIMessageReference>
Creates a new message reference builder.
setChannelId(channelId: Snowflake) : this
channelId: Snowflake
Sets the id of the channel being referenced
setFailIfNotExists(failIfNotExists?: boolean) : this
failIfNotExists?: boolean
Sets whether to fail the message creation if the referenced message does not exist
setGuildId(guildId: Snowflake) : this
guildId: Snowflake
Sets the id of the guild being referenced
setMessageId(messageId: Snowflake) : this
messageId: Snowflake
Sets the id of the message being referenced
setType(type: MessageReferenceType) : this
type: MessageReferenceType
Sets the type of message reference this represents
toJSON(validationOverride?: boolean) : RESTAPIMessageReference
validationOverride?: boolean
Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.