Another chatbot, this one written in node.js.
node.js version >= 5.8.0
ICU library. See installation notes in the node-icu-charset-detector project. This is a dependency of node-irc. For macOS:
brew install icu4c brew link icu4c --force For Ubuntu:
apt-get install libicu-dev Mysql database with the following table:
CREATE TABLE `messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nick` varchar(64) DEFAULT NULL, `message` text, `classification` varchar(16) DEFAULT NULL, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `nick` (`nick`), KEY `classification` (`classification`), KEY `i_date` (`date`) ) Download the dependencies by cd-ing into the botboy directory and running:
npm install - Copy bot.properties.sample to bot.properties
- Edit bot.properties to configure bot:
- yahooId is optional, if present, yahoo answers API is used for some responses.
- replPort is optional, if present, a REPL socket will listen on the specified port
Easy start:
./startup.sh This runs the bot through npm's start mechanism:
npm start To start up the bot normally:
node botboy.js To start up bot and leave a repl open (play with 'bot' variable):
node botboy.js shell Same as above, but don't connect to IRC. Use this to debug message handling:
node botboy.js shell noconnect ./shutdown.sh The shutdown.sh file will be automatically created when the bot starts.