declare class MessageReferenceBuilder implements JSONEncodable<RESTAPIMessageReference>A builder that creates API-compatible JSON data for message references.
Constructors
externalconstructor(data?: Partial<RESTAPIMessageReference>)
data?: Partial<RESTAPIMessageReference>
Creates a new message reference builder.
external setChannelId(channelId: Snowflake) : this
channelId: Snowflake
Sets the id of the channel being referenced
external setFailIfNotExists(failIfNotExists?: boolean) : this
failIfNotExists?: boolean
Sets whether to fail the message creation if the referenced message does not exist
external setGuildId(guildId: Snowflake) : this
guildId: Snowflake
Sets the id of the guild being referenced
external setMessageId(messageId: Snowflake) : this
messageId: Snowflake
Sets the id of the message being referenced
external setType(type: MessageReferenceType) : this
type: MessageReferenceType
Sets the type of message reference this represents
external 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.