BaseInteraction
Extends
ObjectToLower
<Omit
<APIBaseInteraction
<InteractionType
,any
>, |"user"
|"member"
|"message"
|"channel"
|"type"
|"app_permissions"
>>.DiscordBase
<Type
>
Type parameters
Type parameter | Value |
---|---|
FromGuild extends boolean | boolean |
Type extends APIInteraction | APIInteraction |
Constructors
new BaseInteraction(client, interaction, __reply)
1new BaseInteraction<FromGuild, Type>(2 client: UsingClient,3 interaction: Type,4__reply?: __InternalReplyFunction): BaseInteraction<FromGuild, Type>
Parameters
Parameter | Type |
---|---|
client | UsingClient |
interaction | Type |
__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
Property | Modifier | Type | Inherited from |
---|---|---|---|
appPermissions? | public | PermissionsBitField | - |
applicationId | public | string | ObjectToLower.applicationId |
channel? | public | AllChannels | - |
channelId | public | undefined | string | ObjectToLower.channelId |
client | readonly | UsingClient | - |
data | public | | undefined | Object [] | Object | Object [] | Object | ObjectToLower.data |
entitlements | public | Object [] | ObjectToLower.entitlements |
guildId | public | undefined | string | ObjectToLower.guildId |
guildLocale | public | | 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 |
id | public | string | ObjectToLower.id |
locale | public | | "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 |
member | public | When <FromGuild , InteractionGuildMember , undefined > | - |
message? | public | Message | - |
replied? | public | boolean | Promise <boolean > | - |
token | public | string | ObjectToLower.token |
user | public | User | - |
version | public | 1 | ObjectToLower.version |
Accessors
createdAt
1get createdAt(): Date
createdAt gets the creation Date instace of the current object.
Returns
Date
Source
seyfert/src/structures/extra/DiscordBase.ts:27
createdTimestamp
1get createdTimestamp(): number
Create a timestamp for the current object.
Returns
number
Source
seyfert/src/structures/extra/DiscordBase.ts:20
Methods
deferReply()
1deferReply(flags?: MessageFlags): Promise<void>
Parameters
Parameter | Type |
---|---|
flags ? | MessageFlags |
Returns
Promise
<void
>
Source
seyfert/src/structures/Interaction.ts:207
fetchGuild()
1fetchGuild(force: boolean): undefined | Promise<Guild<"cached"> | Guild<"api">>
Parameters
Parameter | Type | Default value |
---|---|---|
force | boolean | false |
Returns
undefined
| Promise
<Guild
<"cached"
> | Guild
<"api"
>>
Source
seyfert/src/structures/Interaction.ts:269
reply()
1reply(body: ReplyInteractionBody): Promise<void>
Parameters
Parameter | Type |
---|---|
body | ReplyInteractionBody |
Returns
Promise
<void
>
Source
seyfert/src/structures/Interaction.ts:196
from()
1static from(2 client: UsingClient,3 gateway: APIInteraction,4 __reply?: __InternalReplyFunction):5 | RoleSelectMenuInteraction6 | UserSelectMenuInteraction7 | MentionableSelectMenuInteraction8 | ChannelSelectMenuInteraction9 | StringSelectMenuInteraction<string[]>10 | AutocompleteInteraction<boolean>11 | ChatInputCommandInteraction<boolean>12 | UserCommandInteraction<boolean>13 | MessageCommandInteraction<boolean>14 | ButtonInteraction15 | ModalSubmitInteraction<boolean>16| BaseInteraction<boolean, APIPingInteraction>
Parameters
Parameter | Type |
---|---|
client | UsingClient |
gateway | APIInteraction |
__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()
1static 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
Parameter | Type |
---|---|
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 |
Returns
T
Source
seyfert/src/structures/Interaction.ts:164
transformBodyRequest()
1static transformBodyRequest(body: ReplyInteractionBody, self: BaseClient): APIInteractionResponse
Parameters
Parameter | Type |
---|---|
body | ReplyInteractionBody |
self | BaseClient |
Returns
APIInteractionResponse