Skip to content

Latest commit

 

History

History
319 lines (208 loc) · 9 KB

bot-options.md

File metadata and controls

319 lines (208 loc) · 9 KB

⚙ Bot options ⚙

Your bot can be customized if you want it to have a different behaviour. The options that it supports are:

symbol

The symbol that goes before the command name.

!help command

  • Default value: !
  • Value type: string

contentProp

The property of the Message object which contains its text.

  • Default value: content
  • Value type: string

messageEvent

The event emitted by the Client when the bot receives a message.

  • Default value: message
  • Value type: string

textFormatting

formatted text

Symbols to format text.

bold

Default value: *

italic

Default value: _

underline

Default value: empty

strikethrough

Default value: ~

code

Default value: ```

botMessages

Messages that the bot sends to the user for various situations.

error

The message sent by the bot when there is an internal error.

error message

  • Default value: There was an error processing your command
  • Value type: string

emoji

Emojis that go before messages for various situations.

list

Emoji used to list commands. This is used in the help command, and when suggesting commands.

  • Default value: ✅
  • Value type: string

error

Emoji used when there is an internal error, or when a non existent command is sent by the user.

  • Default value: ❌
  • Value type: string

question

Emoji used for the help commands. It used on the general and specific help, and also when the user sends a non existent command.

  • Default value: ❓
  • Value type: string

suggestion

The message sent by the bot when the user sends a non existent command.

suggestions message

Value type: object

similarity

Similarity rate used to suggest similar commands. How similar the command needs to be in order to be suggested.

  • Default value: 0.5
  • Value type: number from 0 (totally different) to 1 (equal)

commandInfo

Part of the message letting the user know that the command doesn't exist.

info part

  • Default value: (commandName) => `${commandName} doesn't exist`
  • Value type: string | ((commandName: string) => string)

listMessage

Part of the message before listing similar commands in case there are.

suggestion part

  • Default value: Maybe you meant

helpInfo

Part of the message letting the user know how to use the help command.

help part

  • Default value: (helpCommandName) => `Send ${helpCommandName} for more info`
  • Value type: string | ((helpCommandName: string) => string)

help

Messages sent by the bot when the user sends the help command.

General help:

general help message

Specific command help:

specific command help message

Value type: object

name

Name of the help command.

name of the command

  • Default value: help
  • Value type: string

message

Part of the message before listing available commands.

help message

  • Default value: I can handle the following commands
  • Value type: string

specificHelpMessage

Part of the general help message suggesting to use the specific help command.

specific help part on general help

  • Default value: (specificHelpCommand) => `Send ${specificHelpCommand} for more information about commands`
  • Value type: string | ((specificHelpCommand: string) => string)

documentation

Documentation object for the help command.

description

Short description of the help command.

help command description

  • Default value: Gives information about every command
  • Value type: string

explanation

Detailed explanation of the help command.

help command explanation

  • Default value: Use this command followed by another command's name to get more info about a it
  • Value type: string

exampleInput

Example of the command usage.

specifichelp command example input

general help command example input

  • Default value: command name
  • Value type: string

exampleText

Part of the message before showing the example of the command usage.

example help text

  • Default value: For example
  • Value type: string

withoutDocumentation

Message sent for the specific help when the command doesn't have documentation.

specific help without documentation

  • Default value: This command doesn't have documentation
  • Value type: string

authData

Data that will be passed to the auth method. Could be tokens, or whatever you need.

  • Default value: null
  • Value type: any