yor.ts / Exports / MessageContextMenuCommandInteraction

Class: MessageContextMenuCommandInteraction

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new MessageContextMenuCommandInteraction(client, data): MessageContextMenuCommandInteraction Represents a message context menu command

Parameters

NameTypeDescription
clientYorClientThe client object.
dataAPIMessageApplicationCommandInteractionThe data object.

Returns

MessageContextMenuCommandInteraction

Overrides

ContextMenuCommandInteraction.constructor

Defined in

src/structures/Contexts/ContextMenu/MessageContextMenuCommandInteraction.ts:18

Properties

applicationId

applicationId: string

Inherited from

ContextMenuCommandInteraction.applicationId

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:23

client

client: YorClient

Inherited from

ContextMenuCommandInteraction.client

Defined in

src/structures/Base.ts:4

interactionId

interactionId: string

Inherited from

ContextMenuCommandInteraction.interactionId

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:22

raw

raw: APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction

Inherited from

ContextMenuCommandInteraction.raw

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:16

targetId

targetId: string

Inherited from

ContextMenuCommandInteraction.targetId

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:21

token

token: string

Inherited from

ContextMenuCommandInteraction.token

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:20

Methods

decorate

decorate(name, data): unknown Decorates the object with a new property.

Parameters

NameTypeDescription
namestringThe name of the property.
dataunknownThe data to assign to the property.

Returns

unknown The decorated object.

Inherited from

ContextMenuCommandInteraction.decorate

Defined in

src/structures/Contexts/BaseContext.ts:22

defer

defer(ephemeral?): Promise<void> Defers the execution of the function.

Parameters

NameTypeDefault valueDescription
ephemeralbooleanfalseWhether the message is ephemeral or not.

Returns

Promise<void> A promise that resolves when the deferral is complete.

Inherited from

ContextMenuCommandInteraction.defer

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:53

deleteReply

deleteReply(): Promise<void> Deletes a reply.

Returns

Promise<void> A promise that resolves when the reply is deleted.

Inherited from

ContextMenuCommandInteraction.deleteReply

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:126

editReply

editReply(data): Promise<APIMessage> Edits a reply.

Parameters

NameTypeDescription
dataOmit<RESTPostAPIWebhookWithTokenJSONBody, "username" | "avatar_url"> & { flags?: MessageFlags } & { files?: RawFile[] }The data for editing the reply.

Returns

Promise<APIMessage> A promise that resolves when the reply is edited.

Inherited from

ContextMenuCommandInteraction.editReply

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:100

fetchReply

fetchReply(): Promise<APIMessage> Fetches the reply asynchronously.

Returns

Promise<APIMessage> A promise that resolves when the original reply is fetched.

Inherited from

ContextMenuCommandInteraction.fetchReply

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:138

followUp

followUp(data): Promise<APIMessage> Calls the followUp method of the API class with the provided data.

Parameters

NameTypeDescription
dataOmit<RESTPostAPIWebhookWithTokenJSONBody, "username" | "avatar_url"> & { flags?: MessageFlags } & { files?: RawFile[] }The data to be passed to the followUp method.

Returns

Promise<APIMessage> A promise that resolves to an APIMessage object.

Inherited from

ContextMenuCommandInteraction.followUp

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:175

getTargetMessage

getTargetMessage(): null | APIMessage Retrieves the target message from the resolved messages.

Returns

null | APIMessage The target message, or null if not found.

Defined in

src/structures/Contexts/ContextMenu/MessageContextMenuCommandInteraction.ts:30

reply

reply(data): Promise<void> Replies to an interaction.

Parameters

NameTypeDescription
dataOmit<RESTPostAPIWebhookWithTokenJSONBody, "username" | "avatar_url"> & { flags?: MessageFlags } & { files?: RawFile[] }The data for creating the reply.

Returns

Promise<void> A promise that resolves when the reply is sent.

Inherited from

ContextMenuCommandInteraction.reply

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:73

replyModal

replyModal(data): Promise<void> Reply to a modal.

Parameters

NameTypeDescription
dataAPIModalInteractionResponseCallbackDataThe data for creating the modal.

Returns

Promise<void> A promise that resolves when the modal is created.

Inherited from

ContextMenuCommandInteraction.replyModal

Defined in

src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:151