class MessageReferenceBuilder

external
declare class MessageReferenceBuilder implements JSONEncodable<RESTAPIMessageReference>

A builder that creates API-compatible JSON data for message references.

Constructors

constructor()

Creates a new message reference builder from API data.

external
clearChannelId() : this

Clear the id of the channel being referenced

external
clearGuildId() : this

Clear the id of the guild being referenced

external
clearType() : this

Clear the type of message reference this represents

external
setChannelId(
channelId: Snowflake
) : this

Sets the id of the channel being referenced

external
setFailIfNotExists(
failIfNotExists?: boolean
) : this

Sets whether to fail the message creation if the referenced message does not exist

external
setGuildId(
guildId: Snowflake
) : this

Sets the id of the guild being referenced

external
setMessageId(
messageId: Snowflake
) : this

Sets the id of the message being referenced

external
setType() : this

Sets the type of message reference this represents

external
toJSON(
validationOverride?: boolean
) : RESTAPIMessageReference

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.