Represents a command-based (slash command) interaction.

Hierarchy (view full)

Constructors

Properties

_client: Client
applicationId: string
appPermissions?: string
authorizingIntegrationOwners?: any
channel?: GuildChannel
channelId?: string
commandId: string
commandName: string
context?: number
data?: any
entitlements?: any[]
guild?: Guild
guildId?: string
guildLocale?: string
id: string
locale?: string
member?: Member
message?: Message
options?: any
token: string
type: number
user?: User
version: number = 1

Methods

  • Convenience method for getting a specific option by name.

    Parameters

    • name: string

      The name of the option to retrieve.

    Returns any

    The matching option or undefined.

  • Sends a reply to an interaction with the specified options.

    Parameters

    • options: object | MessagePayload

      The reply options, which can be an instance of MessagePayload or a plain object with message data.

    Returns Promise<any>

    A promise that resolves with the result of the interaction reply.

    Error If there is an issue with processing the interaction or sending the reply.