Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/commands/command.ts>CommandsManager

An easy to use Discord API Library for Deno.
Go to Latest
class CommandsManager
import { CommandsManager } from "https://deno.land/x/harmony@v2.8.0/src/commands/command.ts";

Constructors

new
CommandsManager(client: CommandClient)

Properties

readonly
count: number

Number of loaded Commands

disabled: Set<string>
list: Collection<string, Command>

Methods

add(cmd: Command | Command): boolean

Add a Command

category(category: string): Collection<string, Command>

Get all commands of a Category

delete(cmd: string | Command): boolean

Delete a Command

disable(name: string | Command): boolean

Disable a Command

exists(search: Command | string, subPrefix?: string): boolean

Check whether a Command exists or not

fetch(parsed: ParsedCommand, bypassDisable?: boolean): Command | undefined

Fetch a Command including disable checks, sub commands and subPrefix implementation

filter(search: string, subPrefix?: string): Collection<string, Command>

Filter out Commands by name/alias

find(search: string, subPrefix?: string): Command | undefined

Find a Command by name/alias

isDisabled(name: string | Command): boolean

Check whether a Command is disabled or not