Skip to content

ButtonInteraction

Extends

Constructors

new ButtonInteraction(client, interaction, __reply)

1
new ButtonInteraction(
2
client: UsingClient,
3
interaction: APIMessageComponentInteraction,
4
__reply?: __InternalReplyFunction): ButtonInteraction

Parameters

ParameterType
clientUsingClient
interactionAPIMessageComponentInteraction
__reply?__InternalReplyFunction

Returns

ButtonInteraction

Inherited from

ComponentInteraction.constructor

Source

seyfert/src/structures/Interaction.ts:92

Properties

PropertyModifierTypeOverridesInherited from
appPermissions?publicPermissionsBitFieldComponentInteraction.appPermissionsComponentInteraction.appPermissions
applicationIdpublicstringComponentInteraction.applicationIdComponentInteraction.applicationId
channelpublicAllChannelsComponentInteraction.channelComponentInteraction.channel
channelIdpublicstringComponentInteraction.channelIdComponentInteraction.channelId
clientreadonlyUsingClientComponentInteraction.clientComponentInteraction.client
datapublicObjectComponentInteraction.dataComponentInteraction.data
data.componentTypepublicButton--
data.customIdpublicstring--
entitlementspublicObject[]ComponentInteraction.entitlementsComponentInteraction.entitlements
guildIdpublicundefined | stringComponentInteraction.guildIdComponentInteraction.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"ComponentInteraction.guildLocaleComponentInteraction.guildLocale
idpublicstringComponentInteraction.idComponentInteraction.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"ComponentInteraction.localeComponentInteraction.locale
memberpublicundefined | InteractionGuildMemberComponentInteraction.memberComponentInteraction.member
messagepublicMessageComponentInteraction.messageComponentInteraction.message
replied?publicboolean | Promise<boolean>ComponentInteraction.repliedComponentInteraction.replied
tokenpublicstringComponentInteraction.tokenComponentInteraction.token
typepublicMessageComponentComponentInteraction.typeComponentInteraction.type
userpublicUserComponentInteraction.userComponentInteraction.user
versionpublic1ComponentInteraction.versionComponentInteraction.version

Accessors

componentType

1
get componentType():
2
| Button
3
| StringSelect
4
| UserSelect
5
| RoleSelect
6
| MentionableSelect
7
| ChannelSelect

Returns

| Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect

Source

seyfert/src/structures/Interaction.ts:443


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


customId

1
get customId(): string

Returns

string

Source

seyfert/src/structures/Interaction.ts:439

Methods

deferReply()

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

Parameters

ParameterType
flags?MessageFlags

Returns

Promise<void>

Inherited from

ComponentInteraction.deferReply

Source

seyfert/src/structures/Interaction.ts:207


deferUpdate()

1
deferUpdate(): Promise<void>

Returns

Promise<void>

Inherited from

ComponentInteraction.deferUpdate

Source

seyfert/src/structures/Interaction.ts:433


deleteMessage()

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

Parameters

ParameterType
messageIdstring

Returns

Promise<undefined | void>

Inherited from

ComponentInteraction.deleteMessage

Source

seyfert/src/structures/Interaction.ts:383


deleteResponse()

1
deleteResponse(): Promise<undefined | void>

Returns

Promise<undefined | void>

Inherited from

ComponentInteraction.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

ComponentInteraction.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

ComponentInteraction.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

ComponentInteraction.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

ComponentInteraction.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

ComponentInteraction.fetchMessage

Source

seyfert/src/structures/Interaction.ts:332


fetchResponse()

1
fetchResponse(): Promise<undefined | WebhookMessage>

Returns

Promise<undefined | WebhookMessage>

Inherited from

ComponentInteraction.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

ComponentInteraction.followup

Source

seyfert/src/structures/Interaction.ts:387


isButton()

1
isButton(): this is ButtonInteraction

Returns

this is ButtonInteraction

Inherited from

ComponentInteraction.isButton

Source

seyfert/src/structures/Interaction.ts:447


isChannelSelectMenu()

1
isChannelSelectMenu(): this is ChannelSelectMenuInteraction

Returns

this is ChannelSelectMenuInteraction

Inherited from

ComponentInteraction.isChannelSelectMenu

Source

seyfert/src/structures/Interaction.ts:451


isMentionableSelectMenu()

1
isMentionableSelectMenu(): this is MentionableSelectMenuInteraction

Returns

this is MentionableSelectMenuInteraction

Inherited from

ComponentInteraction.isMentionableSelectMenu

Source

seyfert/src/structures/Interaction.ts:459


isRoleSelectMenu()

1
isRoleSelectMenu(): this is RoleSelectMenuInteraction

Returns

this is RoleSelectMenuInteraction

Inherited from

ComponentInteraction.isRoleSelectMenu

Source

seyfert/src/structures/Interaction.ts:455


isStringSelectMenu()

1
isStringSelectMenu(): this is StringSelectMenuInteraction<string[]>

Returns

this is StringSelectMenuInteraction<string[]>

Inherited from

ComponentInteraction.isStringSelectMenu

Source

seyfert/src/structures/Interaction.ts:467


isUserSelectMenu()

1
isUserSelectMenu(): this is UserSelectMenuInteraction

Returns

this is UserSelectMenuInteraction

Inherited from

ComponentInteraction.isUserSelectMenu

Source

seyfert/src/structures/Interaction.ts:463


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

Parameters

ParameterType
bodyModalCreateBodyRequest

Returns

Promise<void>

Inherited from

ComponentInteraction.modal

Source

seyfert/src/structures/Interaction.ts:352


reply()

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

Parameters

ParameterType
bodyReplyInteractionBody

Returns

Promise<void>

Inherited from

ComponentInteraction.reply

Source

seyfert/src/structures/Interaction.ts:196


update()

1
update(data: Omit<APIInteractionResponseCallbackData, "components" | "embeds"> & ResolverProps): Promise<void>

Parameters

ParameterType
dataOmit<APIInteractionResponseCallbackData, "components" | "embeds"> & ResolverProps

Returns

Promise<void>

Inherited from

ComponentInteraction.update

Source

seyfert/src/structures/Interaction.ts:426


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

ComponentInteraction.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

ComponentInteraction.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

ComponentInteraction.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

ComponentInteraction.transformBodyRequest

Source

seyfert/src/structures/Interaction.ts:118