Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SubCommand

Representation of SUB_COMMAND Discord interaction

Hierarchy

Index

Constructors

constructor

Properties

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 ephemeral

ephemeral: EphemeralType

Whether a reply should be visible only to the caller

  • NONE - bot replies are public and visible to everyone in a text channel
  • INTERACTIONS - bot will mark responses to Discord interactions as ephemeral and they will only be visible to the command caller
  • FULL - INTERACTIONS + responses to prefix interactions will be sent as direct messages to the command caller

Read more

readonly
remarks

Since ephemeral interactions cannot be deleted, a placeholding embed will be sent when there will be no response from the command function and announceSuccess will be set to false (placeholding message uses color and title parameters from SUCCESS system message configuration)

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 parent

Command parent

readonly

Readonly permissions

permissions: CommandPermissions

Object containing check functions and permission bitfields

readonly

Readonly type

CommandBot's internal command type

readonly

Optional Readonly usage

usage?: string

Command usage displayed in the help message

readonly

Methods

isBaseCommandType

isChildCommandType

isCommandType

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

start

toObject

Generated using TypeDoc