The context of a slash command.

Constructors

  • Creates a new SlashCommandContext.

    Parameters

    • options: SlashCommandContextBuilder

      The options of the SlashCommandContext.

    Returns SlashCommandContext

Properties

command: SlashCommand

The slash command that was executed.

interaction: CommandInteraction<CacheType>

The interaction that represents the slash command.

interactionHandler: typeof InteractionHandler

The handler that handled the slash command.

Accessors

  • get channel(): null | TextBasedChannel
  • The channel where the slash command was executed.

    Returns null | TextBasedChannel

  • get client(): AdvancedClient
  • The client that handled the slash command.

    Returns AdvancedClient

  • get commandDescription(): string
  • The description of the command that was executed.

    Returns string

  • get commandName(): string
  • The name of the command that was executed.

    Returns string

  • get guild(): null | Guild
  • The guild where the slash command was executed.

    Returns null | Guild

  • get id(): string
  • The id of the command that was executed.

    Returns string

  • get member(): null | GuildMember | APIInteractionGuildMember
  • The member who executed the slash command.

    Returns null | GuildMember | APIInteractionGuildMember

  • get options(): Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">
  • The options of the command that was executed.

    Returns Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">

  • get token(): string
  • The token of the command that was executed.

    Returns string

  • get user(): User
  • The user who executed the slash command.

    Returns User

Methods

  • Defer the reply of the slash command.

    Returns Promise<void>

  • Parameters

    • options: ReplyOptions

    Returns Promise<void>

  • Parameters

    • content: string

    Returns Promise<void>

  • Parameters

    • content: string
    • options: ReplyOptions

    Returns Promise<void>

Generated using TypeDoc