Interaction
Extends
BaseInteraction
<FromGuild
,Type
>
Type parameters
Type parameter | Value |
---|---|
FromGuild extends boolean | boolean |
Type extends APIInteraction | APIInteraction |
Constructors
new Interaction(client, interaction, __reply)
Parameters
Parameter | Type |
---|---|
client | UsingClient |
interaction | Type |
__reply ? | __InternalReplyFunction |
Returns
Interaction
<FromGuild
, Type
>
Inherited from
Source
seyfert/src/structures/Interaction.ts:92
Properties
Property | Modifier | Type | Inherited from |
---|---|---|---|
appPermissions? | public | PermissionsBitField | BaseInteraction .appPermissions |
applicationId | public | string | BaseInteraction .applicationId |
channel? | public | AllChannels | BaseInteraction .channel |
channelId | public | undefined | string | BaseInteraction .channelId |
client | readonly | UsingClient | BaseInteraction .client |
data | public | | undefined | Object [] | Object | Object [] | Object | BaseInteraction .data |
entitlements | public | Object [] | BaseInteraction .entitlements |
guildId | public | undefined | string | BaseInteraction .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" | BaseInteraction .guildLocale |
id | public | string | BaseInteraction .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" | BaseInteraction .locale |
member | public | When <FromGuild , InteractionGuildMember , undefined > | BaseInteraction .member |
message? | public | Message | BaseInteraction .message |
replied? | public | boolean | Promise <boolean > | BaseInteraction .replied |
token | public | string | BaseInteraction .token |
user | public | User | BaseInteraction .user |
version | public | 1 | BaseInteraction .version |
Accessors
createdAt
createdAt gets the creation Date instace of the current object.
Returns
Date
Source
seyfert/src/structures/extra/DiscordBase.ts:27
createdTimestamp
Create a timestamp for the current object.
Returns
number
Source
seyfert/src/structures/extra/DiscordBase.ts:20
Methods
deferReply()
Parameters
Parameter | Type |
---|---|
flags ? | MessageFlags |
Returns
Promise
<void
>
Inherited from
Source
seyfert/src/structures/Interaction.ts:207
deleteMessage()
Parameters
Parameter | Type |
---|---|
messageId | string |
Returns
Promise
<undefined
| void
>
Source
seyfert/src/structures/Interaction.ts:383
deleteResponse()
Returns
Promise
<undefined
| void
>
Source
seyfert/src/structures/Interaction.ts:379
editMessage()
Parameters
Parameter | Type |
---|---|
messageId | string |
body | Omit <RESTPatchAPIWebhookWithTokenMessageJSONBody , "components" | "embeds" > & ResolverProps |
Returns
Promise
<WebhookMessage
>
Source
seyfert/src/structures/Interaction.ts:371
editOrReply()
Type parameters
Type parameter | Value |
---|---|
FR extends boolean | false |
Parameters
Parameter | Type |
---|---|
body | Omit <APIInteractionResponseCallbackData , "components" | "embeds" | "poll" > & SendResolverProps |
fetchReply ? | FR |
Returns
Promise
<When
<FR
, WebhookMessage
, void
>>
Source
seyfert/src/structures/Interaction.ts:359
editResponse()
Parameters
Parameter | Type |
---|---|
body | Omit <RESTPatchAPIWebhookWithTokenMessageJSONBody , "components" | "embeds" > & ResolverProps |
Returns
Promise
<WebhookMessage
>
Source
seyfert/src/structures/Interaction.ts:375
fetchGuild()
Parameters
Parameter | Type | Default value |
---|---|---|
force | boolean | false |
Returns
undefined
| Promise
<Guild
<"cached"
> | Guild
<"api"
>>
Inherited from
Source
seyfert/src/structures/Interaction.ts:269
fetchMessage()
Parameters
Parameter | Type |
---|---|
messageId | string |
Returns
Promise
<undefined
| WebhookMessage
>
Source
seyfert/src/structures/Interaction.ts:332
fetchResponse()
Returns
Promise
<undefined
| WebhookMessage
>
Source
seyfert/src/structures/Interaction.ts:336
followup()
Parameters
Parameter | Type |
---|---|
body | Omit <RESTPostAPIWebhookWithTokenJSONBody , "components" | "embeds" | "poll" > & SendResolverProps |
Returns
Promise
<WebhookMessage
>
Source
seyfert/src/structures/Interaction.ts:387
modal()
Parameters
Parameter | Type |
---|---|
body | ModalCreateBodyRequest |
Returns
Promise
<void
>
Source
seyfert/src/structures/Interaction.ts:352
reply()
Parameters
Parameter | Type |
---|---|
body | ReplyInteractionBody |
Returns
Promise
<void
>
Inherited from
Source
seyfert/src/structures/Interaction.ts:196
write()
Type parameters
Type parameter | Value |
---|---|
FR extends boolean | false |
Parameters
Parameter | Type |
---|---|
body | Omit <APIInteractionResponseCallbackData , "components" | "embeds" | "poll" > & SendResolverProps |
fetchReply ? | FR |
Returns
Promise
<When
<FR
, WebhookMessage
, void
>>
Source
seyfert/src/structures/Interaction.ts:340
from()
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
>
Inherited from
Source
seyfert/src/structures/Interaction.ts:216
transformBody()
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
Inherited from
Source
seyfert/src/structures/Interaction.ts:164
transformBodyRequest()
Parameters
Parameter | Type |
---|---|
body | ReplyInteractionBody |
self | BaseClient |
Returns
APIInteractionResponse
Inherited from
BaseInteraction
.transformBodyRequest