Class: UserContextMenuCommandInteraction
Hierarchy
-
ContextMenuCommandInteraction
↳UserContextMenuCommandInteraction
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new UserContextMenuCommandInteraction(client
, data
): UserContextMenuCommandInteraction
Represents a user context menu command
Parameters
Name | Type | Description |
---|---|---|
client | YorClient | the YorClient object |
data | APIUserApplicationCommandInteraction | the APIUserApplicationCommandInteraction object |
Returns
UserContextMenuCommandInteraction
Overrides
ContextMenuCommandInteraction.constructorDefined in
src/structures/Contexts/ContextMenu/UserContextMenuCommandInteraction.ts:15Properties
applicationId
• applicationId:string
Inherited from
ContextMenuCommandInteraction.applicationIdDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:23client
• client:YorClient
Inherited from
ContextMenuCommandInteraction.clientDefined in
src/structures/Base.ts:4interactionId
• interactionId:string
Inherited from
ContextMenuCommandInteraction.interactionIdDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:22raw
• raw:APIUserApplicationCommandInteraction
| APIMessageApplicationCommandInteraction
Inherited from
ContextMenuCommandInteraction.rawDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:16targetId
• targetId:string
Inherited from
ContextMenuCommandInteraction.targetIdDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:21token
• token:string
Inherited from
ContextMenuCommandInteraction.tokenDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:20Methods
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
ContextMenuCommandInteraction.decorateDefined in
src/structures/Contexts/BaseContext.ts:22defer
▸ 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.
Inherited from
ContextMenuCommandInteraction.deferDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:53deleteReply
▸ deleteReply():Promise
<void
>
Deletes a reply.
Returns
Promise
<void
>
A promise that resolves when the reply is deleted.
Inherited from
ContextMenuCommandInteraction.deleteReplyDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:126editReply
▸ 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.
Inherited from
ContextMenuCommandInteraction.editReplyDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:100fetchReply
▸ fetchReply():Promise
<APIMessage
>
Fetches the reply asynchronously.
Returns
Promise
<APIMessage
>
A promise that resolves when the original reply is fetched.
Inherited from
ContextMenuCommandInteraction.fetchReplyDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:138followUp
▸ 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.
Inherited from
ContextMenuCommandInteraction.followUpDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:175reply
▸ 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.
Inherited from
ContextMenuCommandInteraction.replyDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:73replyModal
▸ 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.
Inherited from
ContextMenuCommandInteraction.replyModalDefined in
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:151targetUser
▸ targetUser():null
| User
Retrieves the target user from the resolved users in the APIUserApplicationCommandInteraction data.
Returns
null
| User
The target user if found, otherwise null.