Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FunctionCommand

Function (executable) command

Hierarchy

Index

Constructors

constructor

Properties

Private Readonly _function

_function: CommandFunction

Command function (called on command execution)

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 manager

Manager in which this command is registered

readonly

Readonly name

name: string

Command name

readonly

Readonly type

CommandBot's internal command type

readonly

Methods

Private handleReply

  • handleReply(interaction: Message | Interaction, result: string | void | MessageEmbed | ReplyMessageOptions): Promise<void>
  • Reply handler

    async

    Parameters

    • interaction: Message | Interaction

      Discord interaction object

    • result: string | void | MessageEmbed | ReplyMessageOptions

      result of command function execution

    Returns Promise<void>

isBaseCommandType

isChildCommandType

isCommandType

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

start

toObject

Generated using TypeDoc