Type Definitions
-
HarukaOptions
-
Description
The options object Haruka should be instantiated with.Properties
Name Type Description configObject The configuration file. See `example-config.json` versionString Haruka’s version. Defaults to `options.config.version` prefixString Haruka’s command prefix, such as `-h`. This must be defined. defaultHarukaDefault Haruka’s catch-all function. If Haruka detects that her prefix was sent but no function was called, this function can warn the sender. Details
-
HarukaFn
-
Description
Describes a Haruka function. These functions are passed to the Haruka instance via Haruka::add()Properties
Name Type Attributes Description nameString The function name. handlerHarukaHandler The Haruka message handler regexRegExp <optional> The regular expression that should trigger this function. If this function is a special function, omit this property. helpObject This function's help descriptions. Name Type Attributes Default Description shortString <optional> This function's short help description. Can be omitted if help.hidden is set to true. longString This function's long help description. hiddenBoolean <optional> true Whether this function should show up in the generic help list. Defaults to true. Details
-
HarukaHandler( msg [, match ], H )
-
Description
A Haruka message handler.Parameters
Name Type Attributes Description msgMessage A DiscordJS Discord message matchArray <optional> The RegExp match that triggered this message. This argument is omitted if this function is a Special function. HHaruka The Haruka instance this function is attached to. Details
-
HarukaDefault( msg )
-
Description
A catchall function, called when a message starts with Haruka's prefix, but no function matched its regular expression.Parameters
Name Type Description msgMessage A DiscordJS Discord message. Details