Classes

Classes

ArgResolver
CacheManager
Command
CommandMessage
CommandStore
Event
EventStore
Extendable
ExtendableStore
Finalizer
FinalizerStore
Inhibitor
InhibitorStore
KlasaClient
KlasaConsole
Language
LanguageStore
Monitor
MonitorStore
ParsedUsage
PermissionLevels
Piece
Possible
Provider
ProviderStore
ReactionHandler
Resolver
RichDisplay
RichMenu
SchemaManager
SettingGateway
SettingResolver
SettingsCache
SQL
Stopwatch
Store
Tag
Util

Events


commandError

Emitted when a command has errored.
Parameters:
Name Type Description
message CommandMessageProxy The message that triggered the command
command Command The command run
params Array.<any> The resolved parameters of the command
error string | Object The command error
Since:
  • 0.3.0
Source:
lib/Client.js#L498

commandInhibited

Emitted when a command has been inhibited.
Parameters:
Name Type Argument Description
message external:Message The message that triggered the command
command Command The command triggered
response string <nullable>
The reason why it was inhibited if not silent
Since:
  • 0.3.0
Source:
lib/Client.js#L479

commandRun

Emitted when a command has been run.
Parameters:
Name Type Argument Description
message CommandMessageProxy The message that triggered the command
command Command The command run
params Array.<any> The resolved parameters of the command
response any <nullable>
Usually a response message, but whatever the command returned.
Since:
  • 0.3.0
Source:
lib/Client.js#L488

commandUnknown

Emitted when an unknown command is called.
Parameters:
Name Type Description
message external:Message The message that triggered the command
command string The command attempted to run
Since:
  • 0.4.0
Source:
lib/Client.js#L471

klasaReady

Emitted when klasa is fully ready and initialized.
Since:
  • 0.3.0
Source:
lib/Client.js#L443

log

A central logging event for klasa.
Parameters:
Name Type Argument Default Description
data string | Object The data to log
type string <optional>
'log' The type of log: 'log', 'debug', 'warn', or 'error'.
Since:
  • 0.3.0
Source:
lib/Client.js#L449

pieceDisabled

Emitted when a piece is disabled.
Parameters:
Name Type Description
piece Piece The piece that was disabled
Since:
  • 0.4.0
Source:
lib/Client.js#L546

pieceEnabled

Emitted when a piece is enabled.
Parameters:
Name Type Description
piece Piece The piece that was enabled
Since:
  • 0.4.0
Source:
lib/Client.js#L539

pieceLoaded

Emitted when a piece is loaded. (This can be spammy on bot startup or anytime you reload all of a piece type.)
Parameters:
Name Type Description
piece Piece The piece that was loaded
Since:
  • 0.4.0
Source:
lib/Client.js#L518

pieceReloaded

Emitted when a piece is reloaded.
Parameters:
Name Type Description
piece Piece The piece that was reloaded
Since:
  • 0.4.0
Source:
lib/Client.js#L532

pieceUnloaded

Emitted when a piece is unloaded.
Parameters:
Name Type Description
piece Piece The piece that was unloaded
Since:
  • 0.4.0
Source:
lib/Client.js#L525

settingUpdate

Emitted when SettingGateway.update, SettingGateway.updateArray or SettingGateway.reset is run.
Parameters:
Name Type Description
gateway SettingGateway The setting gateway with the updated setting
id string The identifier of the gateway that was updated
oldEntries Object The old settings entries
newEntries Object The new settings entries
Since:
  • 0.3.0
Source:
lib/Client.js#L508

verbose

An event for handling verbose logs
Parameters:
Name Type Description
data string | Object The data to log
Since:
  • 0.4.0
Source:
lib/Client.js#L457

wtf

An event for handling wtf logs (what a terrible failure)
Parameters:
Name Type Description
data string | Object The data to log
Since:
  • 0.4.0
Source:
lib/Client.js#L464