Results

Namespace

Type

Type parameters

Hierarchy

  • ICommandConfig <-- You are here!

Index

Properties

Optional ackBehavior

ackBehavior: AckBehavior

Defines the acknowledgement behavior for this command. See the docs on discord.interactions.commands.AckBehavior for more information.

Default: discord.interactions.commands.AckBehavior.AUTO_DEFAULT

description

description: string

A short description of the command. Must not be empty.

This description is displayed on Discord's command UI, under the command name.

name

name: string

The name of the command. Must not contain spaces and must be at least 2 characters in length.

The name is used to execute the command from the client. For example, a command with the name ping may be executed with /ping. Command names must be unique per bot/application.

Optional options

options: OptionsFactory<T>

Used to define options (or arguments) for the user to pass to the command. Must be a function that returns an object of key-value pairs. The key is used as the option name, unless specified in the option constructor's config object.

See discord.interactions.commands.IOptionProviders for a list of option types and their configs.

Example (for a "kick" command's options):

(opts) => ({
  user: opts.guildMember('The user to kick'),
  reason: opts.string({
    description: 'The reason for kicking them.',
    required: false
  })
})

Optional showSourceMessage

showSourceMessage: undefined | false | true
deprecated

After the Discord Slash Commands developer beta, source messages are always shown. You can toggle the public visibility of source messages with the ackBehavior option.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc