Customize
Adding user commands
Any .js
file added to discord/userCommands/
will be automatically discovered and required as a user command
upon running or !reload
. These must export a single, async
function take a context
object as the first argument
(and optionally the remaining command-line parameters as ...args
, those these will also be available in context.options._
).
Within user commands, the function context.registerOneTimeHandler
allows user commands to register a handler (the third parameter)
to be invoked on receipt of the next message of event
type (the first parameter) and a discriminator
(the second parameter).
Ephemeral web pages via templates
mustache.js
is used for HTML templating in the web server,
and via an IPC message the other daemons can create an expiring page backed by a JavaScript object
and templated according to those defined in http/templates
.
For example, this generated page shows the results of a nick
search:
Specifically, this search: