Installation
The easiest way to install toby-node is from NPM. You can run the command below to instally the library:
npm install toby
Or you can clone the source code for toby-node, and install from there.
git clone https://github.com/toby-cloud/toby-node.gitcd toby-nodenpm install
Then in your code:
var toby = ;
Testing your installation
Try connecting to Toby with your user bot, like this:
var botId = '{{ username }}'; // Your username from toby.cloudvar secret = '{{ password }}'; // Your password from toby.cloud var toby = ; // the callback to be executed when connected { console;} // the callback to be executed when disconnected { console;} // the callback to be executed when message received { console;} var bot = botId secret onConnect onDisconnect onMessage;botstart;