❗ Rewrite in LiveScript available. This repo is obsolete.
A simple IRC bot implemented on top of IRC-js, with support for plug-ins.
npm install irc-js-bot
The main support bot in the #css and #html channels on Freenode IRC uses irc-js-bot. He listens to the name rivvles and his triggers are ` and ]. He also has his own channel, #rivvles, which can be used to discuss irc-js-bot as well.
See the examples.
See the examples. Better docs later. Maybe.
<trigger><factoid-name>
, e.g. !hello world
<trigger><command-name>[/<flags>][ <arguments>]
, e.g. !search/n foo bar baz
.
!foo @ johndoe
!foo > johndoe
!foo % johndoe
@
addresses johndoe
in the channel or query of origin; >
sends the message by query; %
sends the message by notice.
!foo # this is just a comment
!foo @ johndoe # this is just a comment
A plug-in is a Node.js module. Assign a function to the module.exports
object; the function is called with this
set to the bot instance. A plug-in has full access to the bot instance, no hand-holding.
Register a special command by calling this.register_special_command
with a configuration object as its sole argument; see any of the bundled official plug-ins for examples.
You can also register an incoming message callback by calling this.register_message_callback
with a function as its sole argument. See the irc-js-bot-admin official plug-in for an example. You can use this to audit incoming messages. Return false
to silently stop processing immediately. This is used in the admin plug-in to ignore users that are on the ignore list.
irc-js-bot comes bundled with several official plug-ins for your convenience. For now, please see the source files for details. Their names start with 'irc-js-bot-'. Each command supports the ? flag for viewing detailed instructions.
There's a list of known plug-ins on the wiki.
UNLICENSE yo.