rocketchat-bot
A bot framework for Rocket.Chat, built on bot-commander.
Usage
Load the bot like so:
const Bot = Bot; const bot = server: "your.rocket.chat" username: "botuser" password: "botpass"; botstart; bot;
Create a plugins
directory, containing your named plugins (e.g. test
, droll
).
Then create a plugin.js
file in the directory:
module { bot action { bot; };};
For more information on the bot
object, see the bot-commander documentation.
The WebSocket and REST APIs are exposed via bot.wsAPI and bot.webAPI respectively.