Skip to main content
Module

x/harmony/mod.ts>CommandClient

An easy to use Discord API Library for Deno.
Go to Latest
class CommandClient
extends Client
import { CommandClient } from "https://deno.land/x/harmony@v2.8.0/mod.ts";

Harmony Client with extended functionality for Message based Commands parsing and handling.

See InteractionsClient (Client#slash) for more info about Slash Commands.

Constructors

new
CommandClient(options: CommandClientOptions)

Properties

allowBots: boolean
allowDMs: boolean
caseSensitive: boolean
categories: CategoriesManager
commands: CommandsManager
extensions: ExtensionsManager
getChannelPrefix: (channelID: string) => PrefixReturnType
getGuildPrefix: (guildID: string) => PrefixReturnType
getUserPrefix: (userID: string) => PrefixReturnType
isChannelBlacklisted: (channelID: string) => boolean | Promise<boolean>
isGuildBlacklisted: (guildID: string) => boolean | Promise<boolean>
isUserBlacklisted: (userID: string) => boolean | Promise<boolean>
mentionPrefix: boolean
middlewares: Array<CommandContextMiddleware<CommandContext>>
owners: string[]
prefix: PrefixType
spacesAfterPrefix: boolean

Methods

processMessage(msg: Message): Promise<any>

Processes a Message to Execute Command.

use<T extends CommandContext>(middleware: CommandContextMiddleware<T>): this

Adds a Middleware Function to Command Client to pre-process all Commands, and can even modify the Context to include additional properties, methods, etc.