Skip to content

BaseInteraction

Extends

  • ObjectToLower<Omit<APIBaseInteraction<InteractionType, any>, | "user" | "member" | "message" | "channel" | "type" | "app_permissions">>.DiscordBase<Type>

Type parameters

Type parameterValue
FromGuild extends booleanboolean
Type extends APIInteractionAPIInteraction

Constructors

new BaseInteraction(client, interaction, __reply)

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

Parameters

ParameterType
clientUsingClient
interactionType
__reply?__InternalReplyFunction

Returns

BaseInteraction<FromGuild, Type>

Inherited from

ObjectToLower< Omit< APIBaseInteraction<InteractionType, any>, 'user' | 'member' | 'message' | 'channel' | 'type' | 'app_permissions' > >.constructor

Source

seyfert/src/structures/Interaction.ts:92

Properties

PropertyModifierTypeInherited from
appPermissions?publicPermissionsBitField-
applicationIdpublicstringObjectToLower.applicationId
channel?publicAllChannels-
channelIdpublicundefined | stringObjectToLower.channelId
clientreadonlyUsingClient-
datapublic| undefined | Object[] | Object | Object[] | ObjectObjectToLower.data
entitlementspublicObject[]ObjectToLower.entitlements
guildIdpublicundefined | stringObjectToLower.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"ObjectToLower.guildLocale
idpublicstringObjectToLower.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"ObjectToLower.locale
memberpublicWhen<FromGuild, InteractionGuildMember, undefined>-
message?publicMessage-
replied?publicboolean | Promise<boolean>-
tokenpublicstringObjectToLower.token
userpublicUser-
versionpublic1ObjectToLower.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>

Source

seyfert/src/structures/Interaction.ts:207


fetchGuild()

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

Parameters

ParameterTypeDefault value
forcebooleanfalse

Returns

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

Source

seyfert/src/structures/Interaction.ts:269


reply()

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

Parameters

ParameterType
bodyReplyInteractionBody

Returns

Promise<void>

Source

seyfert/src/structures/Interaction.ts:196


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>

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

Source

seyfert/src/structures/Interaction.ts:164


transformBodyRequest()

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

Parameters

ParameterType
bodyReplyInteractionBody
selfBaseClient

Returns

APIInteractionResponse

Source

seyfert/src/structures/Interaction.ts:118