Home Manual Reference Source Repository

Typedef

Static Public Summary
public
public
public
public
public
public

Static Public

public CommandBuilderFunctions: Object source

Properties:

NameTypeAttributeDescription
run function
  • optional

The run function to set

hasPermission function
  • optional

The hasPermission function to set

public CommandInfo: Object source

Properties:

NameTypeAttributeDescription
name string

The name of the command (must be lowercase)

aliases string[]
  • optional

Alternative names for the command (all must be lowercase)

module string

The ID of the module the command belongs to (must be lowercase)

memberName string

The member name of the command in the module (must be lowercase)

description string

A short description of the command

usage string
  • optional
  • default: name

The command usage format string

details string
  • optional

A detailed description of the command and its functionality

examples string[]
  • optional

Usage examples of the command

guildOnly boolean
  • optional
  • default: false

Whether or not the command should only function in a guild channel

defaultHandling boolean
  • optional
  • default: true

Whether or not the default command handling should be used. If false, then only patterns will trigger the command.

argsType string
  • optional
  • default: single

One of 'single' or 'multiple'. When 'single', the entire argument string will be passed to run as one argument. When 'multiple', it will be passed as multiple arguments.

argsCount number
  • optional
  • default: 0

The number of arguments to parse from the command string. Only applicable when argsType is 'multiple'. If nonzero, it should be at least 2. When this is 0, the command argument string will be split into as many arguments as it can be. When nonzero, it will be split into a maximum of this number of arguments.

argsSingleQuotes boolean
  • optional
  • default: true

Whether or not single quotes should be allowed to box-in arguments in the command string.

patterns RegExp[]
  • optional

Patterns to use for triggering the command

public CommandResult: Object source

Properties:

NameTypeAttributeDescription
plain string[]
  • optional

Strings to send plain messages for

reply string[]
  • optional

Strings to send reply messages for

direct string[]
  • optional

Strings to send direct messages for

editable boolean
  • optional
  • default: true

Whether or not the command message is editable

public ConfigObject: Object source

Properties:

NameTypeAttributeDescription
name string
  • optional

Name of the bot (required to create a client)

version string
  • optional

Version of the bot (should follow semver, required to create a client)

about string
  • optional

Text information about the bot for the about command

updateURL string
  • optional

URL to a package.json file to check for updates with

token string
  • optional

The bot account API token to log in with

clientOptions ClientOptions
  • optional

The options to pass to the Client constructor

owner string
  • optional

The ID of the bot owner's Discord account

selfbot boolean
  • optional

Whether or not the bot should be running as a selfbot

logMessages boolean
  • optional
  • default: true

Whether or not all chat messages should be printed to the console

storage string
  • optional
  • default: bot-storage

Path to the local storage directory

playingGame string
  • optional
  • default: Message-for-help

Text to show the bot playing

paginationItems number
  • optional
  • default: 10

Maximum number of items per page the default commands use when paginating

updateCheck number
  • optional
  • default: 60

How frequently to check for updates (in minutes)

commandPrefix string
  • optional
  • default: !

The default command prefix (empty/null for mentions only)

commandEditable number
  • optional
  • default: 30

How long commands are editable (in seconds)

nonCommandEdit boolean
  • optional
  • default: true

Whether or not commands will be run in messages that were edited that previously didn't have any commands

log string
  • optional
  • default: bot.log

Path to the log file

logMaxSize number
  • optional
  • default: 5242880

Maximum size of the log file before splitting it (in bytes)

logMaxFiles number
  • optional
  • default: 5

Maximum log files to keep

logLevel string
  • optional
  • default: info

The log level to output to the log file (error, warn, info, verbose, message, debug)

consoleLevel string
  • optional
  • default: info

The log level to output to the console (error, warn, info, verbose, message, debug)

carbonUrl string
  • optional

The Carbon submission URL (for bot creators)

carbonKey string
  • optional

The Carbon key for the bot (for bot creators)

bdpwUrl string
  • optional
  • default: https://bots.discord.pw/api

The bots.discord.pw API URL (for bot creators)

bdpwKey string
  • optional

The bots.discord.pw key for the bot (for bot creators)

public PatternConstants: Object source

Properties:

NameTypeAttributeDescription
userID RegExp

A pattern to match a user ID from a raw ID string or mention

roleID RegExp

A pattern to match a role ID from a raw ID string or mention

channelID RegExp

A pattern to match a channel ID from a raw ID string or mention

allUserMentions RegExp

A pattern to to match any mentions that would notify users

public SearchOptions: Object source

Properties:

NameTypeAttributeDescription
property string
  • optional
  • default: name

The property on items to search against. If empty, the raw object's toString will be used instead.

searchInexact boolean
  • optional
  • default: true

Whether or not to search for inexact matches

searchExact boolean
  • optional
  • default: true

Whether or not to search for exact matches (will narrow down inexact matches if applicable)

useStartsWith boolean
  • optional
  • default: false

Whether or not to search inexact by checking to see if the item starts with the search string rather than contains, if the search string is only one character