Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChatCommand

A representation of CHAT_INPUT command (also known as a slash command)

Hierarchy

Index

Constructors

constructor

Properties

Private Readonly _children

_children: ChildCommandResolvable[] = []

Subcommands and groups of this command

readonly

Optional Readonly aliases

aliases?: string[]

List of different names that can be used to invoke a command (when using prefix interactions)

readonly

Readonly announceSuccess

announceSuccess: boolean

Whether a SUCCESS message should be sent after executing the command function (when there is no other reply)

readonly

Readonly default_permission

default_permission: boolean

Discord API default_permission

readonly

Readonly description

description: string

Command description displayed in the help message or in slash commands menu (Default description: "No description")

readonly

Readonly dm

dm: boolean

If set to false, all interactions that get invoked from private/direct conversations (outside a guild) will result a PermissionError

readonly

Optional Readonly guilds

guilds?: string[]

List of Discord guild (server) IDs in which this command can be used

readonly

Readonly manager

Manager in which this command is registered

readonly

Readonly name

name: string

Command name

readonly

Readonly parameters

parameters: Parameter<any>[]

List of parameters that can passed to this command

readonly

Readonly permissions

permissions: CommandPermissions

Object containing check functions and permission bitfields

readonly

Readonly slash

slash: boolean

Whether this command should be registered as a slash command (default: true)

readonly

Readonly type

CommandBot's internal command type

readonly

Optional Readonly usage

usage?: string

Command usage displayed in the help message

readonly

Readonly visible

visible: boolean

Whether this command is visible in the help message (default: true)

readonly

Accessors

children

hasSubCommands

  • get hasSubCommands(): boolean

Methods

append

fetchSubcommand

  • fetchSubcommand(options: CommandInteractionOption[], interaction: Message | Interaction): null | InputManager

getSubcommand

  • getSubcommand(name: string, group?: string): null | SubCommand

isBaseCommandType

isChildCommandType

isCommandType

  • isCommandType<T>(type: T): this is Commands<T>

start

toObject

Generated using TypeDoc