Members
-
prefix :String
-
Description
Haruka's function prefix, such as `-h`. It musn't contain any whitespace.Details
-
functions :Array.<HarukaFn>
-
Description
A collection of functions, meant to be added via `Haruka::add('function', fn)`Details
-
specials :Array.<HarukaFn>
-
Description
A collection of special functions, meant to be added via `Haruka::add('special', fn)`Details
Methods
-
try( msg ) → {*}
-
Description
Haruka will attempt to reply to the given Discord message if it starts with the prefix. If it can't find one, it will call the `default` function passed during instantiation.Parameters
Name Type Description msg
Message The discord.js Discord message Returns
Details
-
add( type, fn ) → {Haruka}
-
Description
Adds a function to Haruka. This function will be called if a message's content matches its RegExpParameters
Name Type Description type
String An enumerated string, either "function" or "special" fn
HarukaFn A Haruka message handler function. Returns
Details