Options
All
  • Public
  • Public/Protected
  • All
Menu

Built in help command that shows all registered commands

Hierarchy

Index

Constructors

Properties

aliases: string[] = ...

Array of aliases for the command. This is optional, you can omit this if you don't want any aliases for a particular command.

block: boolean = false

Blocks command if there's already an instance of it running under the same user

commandManager: CommandManager

Access to CommandManager

cooldown?: Duration

Cooldown time

description: string = "show all commands and it's description"

Add command description

disable: boolean = false

Disable command.

name: string = "help"

Command name. This will be used to identify command.

permissions: PermissionResolvable[] = []

Required permissions to run this command

postExec: ((msg: Message<boolean>, args?: string[]) => unknown)[] = []

Runs all functions in the array after Command#exec is executed

preExec: ((msg: Message<boolean>, args?: string[]) => unknown)[] = []

Runs all functions in the array before Command#exec is executed

usageBeforeCooldown: number = 1

How many usages before command starts cooldown

Methods

  • exec(msg: Message<boolean>): Promise<void>
  • execute(msg: Message<boolean>, args: string[]): unknown
  • Executes command regardless if argument list is needed.

    Parameters

    • msg: Message<boolean>

      Discord.js Message object

    • args: string[]

      Space seperated arguments

    Returns unknown

  • send(msg: Message<boolean>, text: string): Promise<Message<boolean>>
  • Helper method to wrap a text message to an embed message and send it.

    Parameters

    • msg: Message<boolean>

      Discord.js Message object

    • text: string

      Text message to be sent

    Returns Promise<Message<boolean>>

  • sendEmbed(msg: Message<boolean>, embed: MessageEmbed): Promise<Message<boolean>>
  • Helper method to send an embed messsage.

    Parameters

    • msg: Message<boolean>

      Discord.js Message object

    • embed: MessageEmbed

      Discord.js MessageEmbed object

    Returns Promise<Message<boolean>>

Generated using TypeDoc