Skip to content

DiscordInteraction

The DiscordInteraction class represents an interaction with the Discord API, such as a message interaction, a command, or a modal submission.

Properties

channel

DiscordInteraction.channel  :: Objects.DiscordChannel

guild

DiscordInteraction.guild  :: objects.DiscordGuild

user

DiscordInteraction.user  :: objects.DiscordUser

token

DiscordInteraction.token  :: string

applicationId

DiscordInteraction.applicationId  :: string

id

DiscordInteraction.id  :: string

data

DiscordInteraction.data  :: {
      {… [any]: any …}    }

channelId

DiscordInteraction.channelId  :: string

guilldId

DiscordInteraction.guilldId  :: string

version

DiscordInteraction.version  :: number

appPermissions

DiscordInteraction.appPermissions  :: Builders.PermissionsBuilder

guildLocale

DiscordInteraction.guildLocale  :: string

locale

DiscordInteraction.locale  :: string

deferred

DiscordInteraction.deferred  :: boolean

type

DiscordInteraction.type  :: string

The type of the DiscordInteraction. Default is “DiscordInteraction”.

Methods

editMessageAsync

DiscordInteraction : editMessageAsync (

     messageBuilder: MessageBuilder
)  -> Vendor.Future

Edits the original interaction response message asynchronously.

sendModalAsync

DiscordInteraction : sendModalAsync (

     modalObject: ModalBuilder
)  -> Vendor.Future

Sends a modal in response to the interaction asynchronously.

sendMessageAsync

DiscordInteraction : sendMessageAsync (

     messageBuilder: MessageBuilder
)  -> Vendor.Future

Sends a message in response to the interaction asynchronously.

deferAsync

DiscordInteraction : deferAsync ()  -> Vendor.Future

Defers the interaction response asynchronously.

Functions

new

DiscordInteraction . new (

     discordClient: any
     jsonData: table
)  -> ()

Creates a new DiscordInteraction instance.