nocli-handler.js
  • ๐Ÿ”—Links
    • Link to NPM Package
    • Link to Github Package
  • ๐Ÿš€Introduction
    • Welcome
    • Changelog
  • ๐ŸงชGetting Started
    • Setting Up Your Project
  • โ“Guides
    • Instance
      • Providing a MongoDB Connection
      • Things you really need to know
    • Commands
      • Creating a simple "Ping Pong" Command
      • Command Arguments
      • Enabling Slash Commands
      • Deleting a Command
      • Guild and Owner-only Commands
      • Command Aliases
      • Deferring a command reply
      • Running Events inside a Command
      • Command Cooldowns
      • Setting up Autocomplete
      • Required Permissions
  • ๐ŸซClasses
    • NoCliHandler
      • .connectToMongoDB()
    • ChannelCommands
      • .action()
      • .add()
      • .remove()
      • .getAvailableChannels()
    • Command
    • CommandHandler
      • .getValidations()
      • .readFiles()
      • .runCommand()
      • .isCommand()
    • CustomCommands
      • .loadCommands()
      • .create()
      • .delete()
      • .run()
    • DisabledCommands
      • .loadDisabledCommands()
      • .disable()
      • .enable()
      • .isDisabled()
    • PrefixHandler
      • .loadPrefixes()
      • .get()
      • .set()
    • SlashCommands
      • .getCommands()
      • .findCommand()
      • .optionsAreDifferent()
      • .create()
      • .delete()
      • .createOptions()
    • EventHandler
      • .readFiles()
      • .registerEvents()
      • .isEvent()
  • ๐Ÿ› ๏ธUtilities
    • Cooldowns
      • .loadCooldowns()
      • .getKeyFromCooldownUsage()
      • .cancelCooldown()
      • .updateCooldown()
      • .verifyCooldown()
      • .getKey()
      • .canBypass()
      • .start()
      • .canRunAction()
    • handleCommandAutocomplete
    • handleError
    • log
    • getAllFiles
    • importFile
  • ๐Ÿ†ŽDefinitions
    • NoCliCategoryConfiguration
    • NoCliCategoryType
    • ICommand
    • CommandOptions
    • CommandCallbackOptions
    • NoCliCommandCooldown
    • NoCliCommandType
    • cooldownTypesArray
    • NoCliCooldownType
    • NoCliCooldownKeyOptions
    • IEvent
    • EventConfigurationOptions
    • DynamicValidationConfigurationOptions
    • DynamicValidationCheck
    • DynamicValidationCheckFunction
    • NoCliHandlerOptions
    • NoCliCooldownOptions
    • NoCliCooldownConfigOptions
    • MongoDBConnection
    • MongoDBResult
    • DebugOptions
    • ConfigOptions
    • ValidationPluginsOption
    • NoCliEmojiConfigOptions
    • NoCliLanguageType
    • NoCliRuntimeValidationType
    • NoCliSyntaxValidationType
Powered by GitBook
On this page
  1. Definitions

ICommand

The ICommand interface for a command | Type Interface Annotation

Parameter
Description
Type
Required

type

Whether the command is slash command, legacy command, or both

true

delete

Tells the command handler whether to disable this command from interaction with the guilds

Boolean

false

init

Runs events inside a command

Function

false

autocomplete

Handles autocomplete interaction for a Slash command

Function

false

description

The description of the command

String

true

minArgs

The minimum amount of arguments for the command

Number

false

maxArgs

The maximum amount of arguments for the command

Number

false

correctSyntax

Sends a message specified in correctSyntax if arguments validation failed. Hover from your text editor for annotations.

String

false

expectedArgs

The expected arguments that should be in place. Hover from your text editor for annotations and the important message.

String

false

expectedArgsTypes

Defines the Slash Command option property for expectedArgs

false

permissions

The command permissions

PermissionResolvable[]

false

testOnly

Whether the command is for test guilds or not

Boolean

false

guildOnly

Whether the command only works only in guilds

Boolean

false

ownerOnly

Whether the command is only allowed for bot owners

Boolean

false

deferReply

Tells the command handler whether to delay command reply when any value is returned from the command

Boolean

false

reply

Tells the command handler to tell the bot to either reply or send channel message. Hover on your editor for details

Boolean

false

cooldowns

The command cooldowns

false

options

The Discord.JS arguments (only works for Slash Commands). Specify this if you are used to handle Discord.JS arguments with Slash Commands.

false

callback

The function to execute when the command is called

true

aliases

Short-form commands

String[]

false

PreviousNoCliCategoryTypeNextCommandOptions

Last updated 2 years ago

[]

[]

๐Ÿ†Ž
NoCliCommandType
ApplicationCommandOptionType
NoCliCommandCooldown
ApplicationCommandOptionData
CommandCallbackOptions