If true, the bot's mention can be used as an additional prefix.
Information about the bot's OAuth application.
If true, command names are case-sensitive. For example, users may use !ping and !PING interchangeably (assuming ! is a valid prefix). If false, command names in code must be all lowercase.
If true, prefix matching is case-sensitive.
A list of all loaded commands.
An object of stuff to add to the context object for command functions
The default command, executed if allowMention
is true and the bot is
pinged without a command
If true, the client does not respond to commands by default, and the user
must register their own messageCreate
listener, which can call
processCommand
to perform command handling at an arbitrary point during
the handler's execution
A list of all registered event listeners.
A set of requirements to check for all commands.
If true, messages from other bot accounts will not trigger commands.
If true, requirements set via setGlobalRequirements
will be ignored. Used
for debugging, probably shouldn't be used in production.
A regular expression which matches mention prefixes. Present after the
first 'ready'
event is sent.
The prefix used to trigger commands.
A custom function that determines the command prefix per message.
The token of the bot.
Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Returns an EventContext object with all the current context
Alias for addDir
.
Alias for addFile
.
Load the files in a directory and attempt to add a command from each. Searches recursively through directories, but ignores files and nested directories whose names begin with a period.
Register an EventListener class instance to the client.
Add a command or event exported from a file.
Checks the list of registered commands and returns one whch is known by a given name. Passing an empty string will return the default command, if any.
Adds things to the context objects the client sends.
Returns the command as a list of parsed strings, or null if it's not a valid command
Registers a function used to determine what prefixes to use on a
per-message basis. Returns a string or an array of strings that should be
recognized as prefixes for the message, or undefined
to specify that
the default prefix should be used. If the allowMention
client option is
set, mentions will work regardless of the return value of your custom
function. The empty prefix also always works in private channels.
Given a message, tries to parse a command from it. If it is a command,
executes it and returns true
; otherwise, returns false
.
Alias for reloadFiles()
.
Reloads all commands and events that were loaded via from files. Useful for development to hot-reload components as you work on them.
Set the default command. This command is executed when allowMention
is
true and the bot is pinged with no command.
Set requirements for all commands at once
Generated using TypeDoc
The client.