LogoAntiRaid

@discord-types/builders/message/reference

API reference for @discord-types/builders/message/reference

@discord-types/builders/message/reference

Types

Reference

Raw Type
type Reference = Reference.Prototype, & {
	type: messageTypes.MessageReferenceType?,

	messageId: apiTypes.Snowflake?,

	channelId: apiTypes.Snowflake?,

	guildId: apiTypes.Snowflake?,

	failIfNotExists: boolean?
}

Intersection with variants:

Variant 2
PropTypeDescription
type?
-
messageId?
-
channelId?
-
guildId?
-
failIfNotExists?
-

JSON

Raw Type
type JSON = Reference.Prototype.build(nil :: any),

Functions

Reference.Prototype.setType

[[ type of reference. ]]

Function Signature
--[[
	type of reference.
]]
function Reference.Prototype.setType(self: Reference, type: messageTypes.MessageReferenceType) -> Reference end

Arguments

type

messageTypes.MessageReferenceType

Returns

ret1

Reference

Reference.Prototype.setMessageId

[[ id of the originating message ]]

Function Signature
--[[
	id of the originating message
]]
function Reference.Prototype.setMessageId(self: Reference, messageId: string) -> Reference end

Arguments

messageId

string

Returns

ret1

Reference

Reference.Prototype.setChannelId

[[ id of the originating message's channel ]]

Function Signature
--[[
	id of the originating message's channel
]]
function Reference.Prototype.setChannelId(self: Reference, channelId: string) -> Reference end

Arguments

channelId

string

Returns

ret1

Reference

Reference.Prototype.setGuildId

[[ id of the originating message's guild ]]

Function Signature
--[[
	id of the originating message's guild
]]
function Reference.Prototype.setGuildId(self: Reference, guildId: string) -> Reference end

Arguments

guildId

string

Returns

ret1

Reference

Reference.Prototype.setFailIfNotExists

[[ when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true ]]

Function Signature
--[[
	when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true
]]
function Reference.Prototype.setFailIfNotExists(self: Reference, failIfNotExists: boolean) -> Reference end

Arguments

failIfNotExists

boolean

Returns

ret1

Reference

Reference.Prototype.build

[[ Responsible for building the Reference JSON that can be parsed by the Discord API. ]]

Function Signature
--[[
	Responsible for building the Reference JSON that can be parsed by the Discord API.
]]
function Reference.Prototype.build(self: Reference) -> JSON end

Returns

ret1

JSON

Reference.Interface.new

[[ Responsible for creating a new Reference.

```lua

``` ]]

Function Signature
--[[
	Responsible for creating a new Reference.

	\`\`\`lua
	
	\`\`\`
]]
function Reference.Interface.new(resource: {
		type: messageTypes.MessageReferenceType?,

		messageId: string?,

		channelId: string?,

		guildId: string?,

		failIfNotExists: boolean?
	}?) -> Reference end

Arguments

resource

This field is optional and may not be specified

{type: messageTypes.MessageReferenceType?, messageId: string?, channelId: string?, guildId: string?, failIfNotExists: boolean?}?

Returns

ret1

Reference

Last updated on