MasterBot A Node.js Bot to create a network of bots that can communicate with each other. and share contacts in a peer to peer fashion. beside executing commands, it can also be used to send messages to other bots.
npm install master-bot -s
// or
npm install master-bot -g
const MasterBot = require('master-bot');
const bot = new MasterBot({
name: 'bot1',
port: 3000,
peers: ['http://localhost:3001']
});
bot.start();
Creates a new instance of MasterBot.
Type: Object
Type: String
The name of the bot.
Type: Number
The port on which the bot will listen for incoming connections.
Type: Array
An array of peers to connect to.
Starts the bot.
Stops the bot.
Sends a message to a peer.
Type: String
The message to send.
Type: String
The peer to send the message to.
Emitted when a message is received from a peer.
Type: String
The message received.