yor.ts / Exports / UserContextMenuCommandInteraction
↳ UserContextMenuCommandInteraction
• new UserContextMenuCommandInteraction(client
, data
): UserContextMenuCommandInteraction
Represents a user context menu command
Name | Type | Description |
---|---|---|
client | YorClient | the YorClient object |
data | APIUserApplicationCommandInteraction | the APIUserApplicationCommandInteraction object |
UserContextMenuCommandInteraction
ContextMenuCommandInteraction.constructor
src/structures/Contexts/ContextMenu/UserContextMenuCommandInteraction.ts:15
• applicationId: string
ContextMenuCommandInteraction.applicationId
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:23
• client: YorClient
ContextMenuCommandInteraction.client
• interactionId: string
ContextMenuCommandInteraction.interactionId
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:22
• raw: APIUserApplicationCommandInteraction
| APIMessageApplicationCommandInteraction
ContextMenuCommandInteraction.raw
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:16
• targetId: string
ContextMenuCommandInteraction.targetId
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:21
• token: string
ContextMenuCommandInteraction.token
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:20
▸ decorate(name
, data
): unknown
Decorates the object with a new property.
Name | Type | Description |
---|---|---|
name | string | The name of the property. |
data | unknown | The data to assign to the property. |
unknown
The decorated object.
ContextMenuCommandInteraction.decorate
src/structures/Contexts/BaseContext.ts:22
▸ defer(ephemeral?
): Promise
<void
>
Defers the execution of the function.
Name | Type | Default value | Description |
---|---|---|---|
ephemeral | boolean | false | Whether the message is ephemeral or not. |
Promise
<void
>
A promise that resolves when the deferral is complete.
ContextMenuCommandInteraction.defer
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:53
▸ deleteReply(): Promise
<void
>
Deletes a reply.
Promise
<void
>
A promise that resolves when the reply is deleted.
ContextMenuCommandInteraction.deleteReply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:126
▸ editReply(data
): Promise
<APIMessage
>
Edits a reply.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data for editing the reply. |
Promise
<APIMessage
>
A promise that resolves when the reply is edited.
ContextMenuCommandInteraction.editReply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:100
▸ fetchReply(): Promise
<APIMessage
>
Fetches the reply asynchronously.
Promise
<APIMessage
>
A promise that resolves when the original reply is fetched.
ContextMenuCommandInteraction.fetchReply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:138
▸ followUp(data
): Promise
<APIMessage
>
Calls the followUp method of the API class with the provided data.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data to be passed to the followUp method. |
Promise
<APIMessage
>
A promise that resolves to an APIMessage object.
ContextMenuCommandInteraction.followUp
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:175
▸ reply(data
): Promise
<void
>
Replies to an interaction.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data for creating the reply. |
Promise
<void
>
A promise that resolves when the reply is sent.
ContextMenuCommandInteraction.reply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:73
▸ replyModal(data
): Promise
<void
>
Reply to a modal.
Name | Type | Description |
---|---|---|
data | APIModalInteractionResponseCallbackData | The data for creating the modal. |
Promise
<void
>
A promise that resolves when the modal is created.
ContextMenuCommandInteraction.replyModal
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:151
▸ targetUser(): null
| User
Retrieves the target user from the resolved users in the APIUserApplicationCommandInteraction data.
null
| User
The target user if found, otherwise null.
src/structures/Contexts/ContextMenu/UserContextMenuCommandInteraction.ts:27
yor.ts / Exports / UserContextMenuCommandInteraction
↳ UserContextMenuCommandInteraction
• new UserContextMenuCommandInteraction(client
, data
): UserContextMenuCommandInteraction
Represents a user context menu command
Name | Type | Description |
---|---|---|
client | YorClient | the YorClient object |
data | APIUserApplicationCommandInteraction | the APIUserApplicationCommandInteraction object |
UserContextMenuCommandInteraction
ContextMenuCommandInteraction.constructor
src/structures/Contexts/ContextMenu/UserContextMenuCommandInteraction.ts:15
• applicationId: string
ContextMenuCommandInteraction.applicationId
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:23
• client: YorClient
ContextMenuCommandInteraction.client
• interactionId: string
ContextMenuCommandInteraction.interactionId
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:22
• raw: APIUserApplicationCommandInteraction
| APIMessageApplicationCommandInteraction
ContextMenuCommandInteraction.raw
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:16
• targetId: string
ContextMenuCommandInteraction.targetId
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:21
• token: string
ContextMenuCommandInteraction.token
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:20
▸ decorate(name
, data
): unknown
Decorates the object with a new property.
Name | Type | Description |
---|---|---|
name | string | The name of the property. |
data | unknown | The data to assign to the property. |
unknown
The decorated object.
ContextMenuCommandInteraction.decorate
src/structures/Contexts/BaseContext.ts:22
▸ defer(ephemeral?
): Promise
<void
>
Defers the execution of the function.
Name | Type | Default value | Description |
---|---|---|---|
ephemeral | boolean | false | Whether the message is ephemeral or not. |
Promise
<void
>
A promise that resolves when the deferral is complete.
ContextMenuCommandInteraction.defer
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:53
▸ deleteReply(): Promise
<void
>
Deletes a reply.
Promise
<void
>
A promise that resolves when the reply is deleted.
ContextMenuCommandInteraction.deleteReply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:126
▸ editReply(data
): Promise
<APIMessage
>
Edits a reply.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data for editing the reply. |
Promise
<APIMessage
>
A promise that resolves when the reply is edited.
ContextMenuCommandInteraction.editReply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:100
▸ fetchReply(): Promise
<APIMessage
>
Fetches the reply asynchronously.
Promise
<APIMessage
>
A promise that resolves when the original reply is fetched.
ContextMenuCommandInteraction.fetchReply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:138
▸ followUp(data
): Promise
<APIMessage
>
Calls the followUp method of the API class with the provided data.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data to be passed to the followUp method. |
Promise
<APIMessage
>
A promise that resolves to an APIMessage object.
ContextMenuCommandInteraction.followUp
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:175
▸ reply(data
): Promise
<void
>
Replies to an interaction.
Name | Type | Description |
---|---|---|
data | Omit <RESTPostAPIWebhookWithTokenJSONBody , "username" | "avatar_url" > & { flags? : MessageFlags } & { files? : RawFile [] } | The data for creating the reply. |
Promise
<void
>
A promise that resolves when the reply is sent.
ContextMenuCommandInteraction.reply
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:73
▸ replyModal(data
): Promise
<void
>
Reply to a modal.
Name | Type | Description |
---|---|---|
data | APIModalInteractionResponseCallbackData | The data for creating the modal. |
Promise
<void
>
A promise that resolves when the modal is created.
ContextMenuCommandInteraction.replyModal
src/structures/Contexts/ContextMenu/ContextMenuCommandInteraction.ts:151
▸ targetUser(): null
| User
Retrieves the target user from the resolved users in the APIUserApplicationCommandInteraction data.
null
| User
The target user if found, otherwise null.
src/structures/Contexts/ContextMenu/UserContextMenuCommandInteraction.ts:27