Typedef
Static Public Summary | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Static Public
public CommandInfo: Object source
Properties:
Name | Type | Attribute | Description |
name | string | The name of the command (must be lowercase) |
|
aliases | string[] |
|
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 |
|
The command usage format string |
details | string |
|
A detailed description of the command and its functionality |
examples | string[] |
|
Usage examples of the command |
guildOnly | boolean |
|
Whether or not the command should only function in a guild channel |
defaultHandling | boolean |
|
Whether or not the default command handling should be used. If false, then only patterns will trigger the command. |
argsType | string |
|
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 |
|
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 |
|
Whether or not single quotes should be allowed to box-in arguments in the command string. |
patterns | RegExp[] |
|
Patterns to use for triggering the command |
public CommandResult: Object source
Properties:
Name | Type | Attribute | Description |
plain | string[] |
|
Strings to send plain messages for |
reply | string[] |
|
Strings to send reply messages for |
direct | string[] |
|
Strings to send direct messages for |
editable | boolean |
|
Whether or not the command message is editable |
public ConfigObject: Object source
Properties:
Name | Type | Attribute | Description |
name | string |
|
Name of the bot (required to create a client) |
version | string |
|
Version of the bot (should follow semver, required to create a client) |
about | string |
|
Text information about the bot for the about command |
updateURL | string |
|
URL to a package.json file to check for updates with |
token | string |
|
The bot account API token to log in with |
clientOptions | ClientOptions |
|
The options to pass to the Client constructor |
owner | string |
|
The ID of the bot owner's Discord account |
selfbot | boolean |
|
Whether or not the bot should be running as a selfbot |
logMessages | boolean |
|
Whether or not all chat messages should be printed to the console |
storage | string |
|
Path to the local storage directory |
playingGame | string |
|
Text to show the bot playing |
paginationItems | number |
|
Maximum number of items per page the default commands use when paginating |
updateCheck | number |
|
How frequently to check for updates (in minutes) |
commandPrefix | string |
|
The default command prefix (empty/null for mentions only) |
commandEditable | number |
|
How long commands are editable (in seconds) |
nonCommandEdit | boolean |
|
Whether or not commands will be run in messages that were edited that previously didn't have any commands |
log | string |
|
Path to the log file |
logMaxSize | number |
|
Maximum size of the log file before splitting it (in bytes) |
logMaxFiles | number |
|
Maximum log files to keep |
logLevel | string |
|
The log level to output to the log file (error, warn, info, verbose, message, debug) |
consoleLevel | string |
|
The log level to output to the console (error, warn, info, verbose, message, debug) |
carbonUrl | string |
|
The Carbon submission URL (for bot creators) |
carbonKey | string |
|
The Carbon key for the bot (for bot creators) |
bdpwUrl | string |
|
The bots.discord.pw API URL (for bot creators) |
bdpwKey | string |
|
The bots.discord.pw key for the bot (for bot creators) |
public PatternConstants: Object source
Properties:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
property | string |
|
The property on items to search against. If empty, the raw object's toString will be used instead. |
searchInexact | boolean |
|
Whether or not to search for inexact matches |
searchExact | boolean |
|
Whether or not to search for exact matches (will narrow down inexact matches if applicable) |
useStartsWith | boolean |
|
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 |