Yor.ts | classes/ContextMenuCommandInteraction
yor.ts / Exports / ContextMenuCommandInteraction
Class: ContextMenuCommandInteraction
Hierarchy
-
BaseContext
↳
ContextMenuCommandInteraction
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new ContextMenuCommandInteraction(client
, data
): ContextMenuCommandInteraction
Represents a context menu command
Parameters
Name | Type | Description |
---|---|---|
client | YorClient | The client object. |
data | APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction | The data object. |
Returns
Overrides
BaseContext.constructor
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:31
Properties
applicationId
• applicationId: string
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:23
client
• client: YorClient
Inherited from
BaseContext.client
Defined in
interactionId
• interactionId: string
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:22
raw
• raw: APIUserApplicationCommandInteraction
| APIMessageApplicationCommandInteraction
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:16
targetId
• targetId: string
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:21
token
• token: string
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:20
Methods
decorate
▸ decorate(name
, data
): unknown
Decorates the object with a new property.
Parameters
Name | Type | Description |
---|---|---|
name | string | The name of the property. |
data | unknown | The data to assign to the property. |
Returns
unknown
The decorated object.
Inherited from
BaseContext.decorate
Defined in
src/structures/Contexts/BaseContext.ts:22
defer
▸ defer(ephemeral?
): Promise
<void
>
Defers the execution of the function.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
ephemeral | boolean | false | Whether the message is ephemeral or not. |
Returns
Promise
<void
>
A promise that resolves when the deferral is complete.
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.
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:126
editReply
▸ editReply(data
): Promise
<APIMessage
>
Edits a reply.
Parameters
Name | Type | Description |
---|---|---|
data | Omit <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.
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.
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
Name | Type | Description |
---|---|---|
data | Omit <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.
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:175
reply
▸ reply(data
): Promise
<void
>
Replies to an interaction.
Parameters
Name | Type | Description |
---|---|---|
data | Omit <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.
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:73
replyModal
▸ replyModal(data
): Promise
<void
>
Reply to a modal.
Parameters
Name | Type | Description |
---|---|---|
data | APIModalInteractionResponseCallbackData | The data for creating the modal. |
Returns
Promise
<void
>
A promise that resolves when the modal is created.
Defined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:151
Was this page helpful?