Skip to content

ApplicationCommandInteraction

Extends

Type parameters

Type parameterValue
FromGuild extends booleanboolean
Type extends APIApplicationCommandInteractionAPIApplicationCommandInteraction

Constructors

new ApplicationCommandInteraction(client, interaction, __reply)

1
new ApplicationCommandInteraction<FromGuild, Type>(
2
client: UsingClient,
3
interaction: Type,
4
__reply?: __InternalReplyFunction): ApplicationCommandInteraction<FromGuild, Type>

Parameters

ParameterType
clientUsingClient
interactionType
__reply?__InternalReplyFunction

Returns

ApplicationCommandInteraction<FromGuild, Type>

Inherited from

Interaction.constructor

Source

seyfert/src/structures/Interaction.ts:92

Properties

PropertyModifierTypeInherited from
appPermissions?publicPermissionsBitFieldInteraction.appPermissions
applicationIdpublicstringInteraction.applicationId
channel?publicAllChannelsInteraction.channel
channelIdpublicundefined | stringInteraction.channelId
clientreadonlyUsingClientInteraction.client
datapublic| undefined | Object[] | Object | Object[] | ObjectInteraction.data
entitlementspublicObject[]Interaction.entitlements
guildIdpublicundefined | stringInteraction.guildId
guildLocalepublic| undefined | "id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "es-419" | "sv-SE" | "th" | "tr" | "uk" | "vi"Interaction.guildLocale
idpublicstringInteraction.id
localepublic| "id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "es-419" | "sv-SE" | "th" | "tr" | "uk" | "vi"Interaction.locale
memberpublicWhen<FromGuild, InteractionGuildMember, undefined>Interaction.member
message?publicMessageInteraction.message
replied?publicboolean | Promise<boolean>Interaction.replied
tokenpublicstringInteraction.token
typepublicApplicationCommandType-
userpublicUserInteraction.user
versionpublic1Interaction.version

Accessors

createdAt

1
get createdAt(): Date

createdAt gets the creation Date instace of the current object.

Returns

Date

Source

seyfert/src/structures/extra/DiscordBase.ts:27


createdTimestamp

1
get createdTimestamp(): number

Create a timestamp for the current object.

Returns

number

Source

seyfert/src/structures/extra/DiscordBase.ts:20

Methods

deferReply()

1
deferReply(flags?: MessageFlags): Promise<void>

Parameters

ParameterType
flags?MessageFlags

Returns

Promise<void>

Inherited from

Interaction.deferReply

Source

seyfert/src/structures/Interaction.ts:207


deleteMessage()

1
deleteMessage(messageId: string): Promise<undefined | void>

Parameters

ParameterType
messageIdstring

Returns

Promise<undefined | void>

Inherited from

Interaction.deleteMessage

Source

seyfert/src/structures/Interaction.ts:383


deleteResponse()

1
deleteResponse(): Promise<undefined | void>

Returns

Promise<undefined | void>

Inherited from

Interaction.deleteResponse

Source

seyfert/src/structures/Interaction.ts:379


editMessage()

1
editMessage(messageId: string, body: Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps): Promise<WebhookMessage>

Parameters

ParameterType
messageIdstring
bodyOmit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps

Returns

Promise<WebhookMessage>

Inherited from

Interaction.editMessage

Source

seyfert/src/structures/Interaction.ts:371


editOrReply()

1
editOrReply<FR>(body: Omit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps, fetchReply?: FR): Promise<When<FR, WebhookMessage, void>>

Type parameters

Type parameterValue
FR extends booleanfalse

Parameters

ParameterType
bodyOmit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps
fetchReply?FR

Returns

Promise<When<FR, WebhookMessage, void>>

Inherited from

Interaction.editOrReply

Source

seyfert/src/structures/Interaction.ts:359


editResponse()

1
editResponse(body: Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps): Promise<WebhookMessage>

Parameters

ParameterType
bodyOmit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps

Returns

Promise<WebhookMessage>

Inherited from

Interaction.editResponse

Source

seyfert/src/structures/Interaction.ts:375


fetchGuild()

1
fetchGuild(force: boolean): undefined | Promise<Guild<"cached"> | Guild<"api">>

Parameters

ParameterTypeDefault value
forcebooleanfalse

Returns

undefined | Promise<Guild<"cached"> | Guild<"api">>

Inherited from

Interaction.fetchGuild

Source

seyfert/src/structures/Interaction.ts:269


fetchMessage()

1
fetchMessage(messageId: string): Promise<undefined | WebhookMessage>

Parameters

ParameterType
messageIdstring

Returns

Promise<undefined | WebhookMessage>

Inherited from

Interaction.fetchMessage

Source

seyfert/src/structures/Interaction.ts:332


fetchResponse()

1
fetchResponse(): Promise<undefined | WebhookMessage>

Returns

Promise<undefined | WebhookMessage>

Inherited from

Interaction.fetchResponse

Source

seyfert/src/structures/Interaction.ts:336


followup()

1
followup(body: Omit<RESTPostAPIWebhookWithTokenJSONBody, "components" | "embeds" | "poll"> & SendResolverProps): Promise<WebhookMessage>

Parameters

ParameterType
bodyOmit<RESTPostAPIWebhookWithTokenJSONBody, "components" | "embeds" | "poll"> & SendResolverProps

Returns

Promise<WebhookMessage>

Inherited from

Interaction.followup

Source

seyfert/src/structures/Interaction.ts:387


1
modal(body: ModalCreateBodyRequest): Promise<void>

Parameters

ParameterType
bodyModalCreateBodyRequest

Returns

Promise<void>

Inherited from

Interaction.modal

Source

seyfert/src/structures/Interaction.ts:352


reply()

1
reply(body: ReplyInteractionBody): Promise<void>

Parameters

ParameterType
bodyReplyInteractionBody

Returns

Promise<void>

Inherited from

Interaction.reply

Source

seyfert/src/structures/Interaction.ts:196


respond()

1
respond(data: APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseUpdateMessage): Promise<void>

Parameters

ParameterType
dataAPIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseUpdateMessage

Returns

Promise<void>

Source

seyfert/src/structures/Interaction.ts:397


write()

1
write<FR>(body: Omit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps, fetchReply?: FR): Promise<When<FR, WebhookMessage, void>>

Type parameters

Type parameterValue
FR extends booleanfalse

Parameters

ParameterType
bodyOmit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps
fetchReply?FR

Returns

Promise<When<FR, WebhookMessage, void>>

Inherited from

Interaction.write

Source

seyfert/src/structures/Interaction.ts:340


from()

1
static from(
2
client: UsingClient,
3
gateway: APIInteraction,
4
__reply?: __InternalReplyFunction):
5
| RoleSelectMenuInteraction
6
| UserSelectMenuInteraction
7
| MentionableSelectMenuInteraction
8
| ChannelSelectMenuInteraction
9
| StringSelectMenuInteraction<string[]>
10
| AutocompleteInteraction<boolean>
11
| ChatInputCommandInteraction<boolean>
12
| UserCommandInteraction<boolean>
13
| MessageCommandInteraction<boolean>
14
| ButtonInteraction
15
| ModalSubmitInteraction<boolean>
16
| BaseInteraction<boolean, APIPingInteraction>

Parameters

ParameterType
clientUsingClient
gatewayAPIInteraction
__reply?__InternalReplyFunction

Returns

| RoleSelectMenuInteraction | UserSelectMenuInteraction | MentionableSelectMenuInteraction | ChannelSelectMenuInteraction | StringSelectMenuInteraction<string[]> | AutocompleteInteraction<boolean> | ChatInputCommandInteraction<boolean> | UserCommandInteraction<boolean> | MessageCommandInteraction<boolean> | ButtonInteraction | ModalSubmitInteraction<boolean> | BaseInteraction<boolean, APIPingInteraction>

Inherited from

Interaction.from

Source

seyfert/src/structures/Interaction.ts:216


transformBody()

1
static transformBody<T>(body: Omit<RESTPostAPIChannelMessageJSONBody, "components" | "embeds" | "poll"> & SendResolverProps | Omit<RESTPatchAPIChannelMessageJSONBody, "components" | "embeds"> & ResolverProps | Omit<RESTPostAPIWebhookWithTokenJSONBody, "components" | "embeds" | "poll"> & SendResolverProps | Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps, self: UsingClient): T

Type parameters

Type parameter
T

Parameters

ParameterType
bodyOmit<RESTPostAPIChannelMessageJSONBody, "components" | "embeds" | "poll"> & SendResolverProps | Omit<RESTPatchAPIChannelMessageJSONBody, "components" | "embeds"> & ResolverProps | Omit<RESTPostAPIWebhookWithTokenJSONBody, "components" | "embeds" | "poll"> & SendResolverProps | Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps
selfUsingClient

Returns

T

Inherited from

Interaction.transformBody

Source

seyfert/src/structures/Interaction.ts:164


transformBodyRequest()

1
static transformBodyRequest(body: ReplyInteractionBody, self: BaseClient): APIInteractionResponse

Parameters

ParameterType
bodyReplyInteractionBody
selfBaseClient

Returns

APIInteractionResponse

Inherited from

Interaction.transformBodyRequest

Source

seyfert/src/structures/Interaction.ts:118