class MessageReferenceBuilder

export 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.

clearChannelId() : this

Clear the id of the channel being referenced

clearGuildId() : this

Clear the id of the guild being referenced

clearType() : this

Clear the type of message reference this represents

setChannelId(
channelId: Snowflake
) : this

Sets the id of the channel being referenced

setFailIfNotExists(
failIfNotExists?: boolean
) : this

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

setGuildId(
guildId: Snowflake
) : this

Sets the id of the guild being referenced

setMessageId(
messageId: Snowflake
) : this

Sets the id of the message being referenced

setType() : this

Sets the type of message reference this represents

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.