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
  • Debugging (debugging)
  • Configuring Cooldowns (cooldownConfig)
  • Test Servers (testServers) and Bot Owners (botOwners)
  • Configuring Emojis (emojiConfig)
  • Disabling Default Commands (disabledDefaultCommands)
  1. Guides
  2. Instance

Things you really need to know

There are some things you need to know about some options before working on outside of this NoCliHandler instance.

Debugging (debugging)

Parameter
Description

showFullErrorLog

Whether or not to show the full error log

showBanner

Whether or not to show the banner upon the start of the program

Configuring Cooldowns (cooldownConfig)

Parameter
Description

defaultErrorMessage

Sets the default error message

botOwnersBypass

Whether to allow bot owners to bypass command cooldowns

dbRequired

Sets the default command cooldown limit. If cooldown limit exceeds, it will be stored in the database

Test Servers (testServers) and Bot Owners (botOwners)

Option
Description
Type

testServers

The test servers only testonly commands can run in

String[]

botOwners

The bot owners

String[]

For botOwners, the command handler will automatically add in the bot owners based on the person/organisation that owns the bot when not specified.

Configuring Emojis (emojiConfig)

This emoji configuration will have the following options:

  • disabled

  • enabled

  • error

  • info

  • success

All of these options have a type String, so do specify this if you want to have custom emojis for the bot to send messages based on the command handler.

Disabling Default Commands (disabledDefaultCommands)

There are some default commands you do not want to deploy when the bot starts, so here is a trick.

disabledDefaultCommands has an Array type String, and here are the default commands you need to know to disable (some of them marked with a check are not implemented yet):

Just specify any of them into an array and the command handler will disable it for you.

When specifying one of these default commands, please specify them correctly. Otherwise, the command handler will ignore the incorrectly spelled specified default commands

PreviousProviding a MongoDB ConnectionNextCommands

Last updated 2 years ago

โ“