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

x/harmony/src/commands/mod.ts>CommandOptions

An easy to use Discord API Library for Deno.
Go to Latest
interface CommandOptions
Re-export
import { type CommandOptions } from "https://deno.land/x/harmony@v2.8.0/src/commands/mod.ts";

Properties

optional
name: string

Name of the Command

optional
description: string

Description of the Command

optional
category: string

Category of the Command

optional
aliases: string | string[]

Array of Aliases of Command, or only string

optional
extension: Extension

Extension (Parent) of the Command

optional
usage: string | string[]

Usage of Command, only Argument Names

optional
examples: string | string[]

Usage Example of Command, only Arguments (without Prefix and Name)

optional
optionalArgs: boolean

Make arguments optional. Eg: Don't require any args to be present to execute the command. default: false

optional
args: Args[]

Does the Command take Arguments? Maybe number of required arguments? Or list of arguments?

optional
permissions: string | string[]

Permissions(s) required by both User and Bot in order to use Command

optional
userPermissions: string | string[]

Permission(s) required for using Command

optional
botPermissions: string | string[]

Permission(s) bot will need in order to execute Command

optional
roles: string | string[]

Role(s) user will require in order to use Command. List or one of ID or name

optional
whitelistedGuilds: string | string[]

Whitelisted Guilds. Only these Guild(s) can execute Command. (List or one of IDs)

optional
whitelistedChannels: string | string[]

Whitelisted Channels. Command can be executed only in these channels. (List or one of IDs)

optional
whitelistedUsers: string | string[]

Whitelisted Users. Command can be executed only by these Users (List or one of IDs)

optional
nsfw: boolean

Whether the Command can only be used in NSFW channel or not

optional
guildOnly: boolean

Whether the Command can only be used in Guild (if allowed in DMs)

optional
dmOnly: boolean

Whether the Command can only be used in Bot's DMs (if allowed)

optional
ownerOnly: boolean

Whether the Command can only be used by Bot Owners

optional
subCommands: CommandOptions[]

Sub Commands