Starbot is a lightweight framework for quickly and easily creating bots for different social platforms. Plug-ins expand functionality of the framework. The framework only manages the modules.
Modules storage:
Modules adapters:
Modules to control the bot:
$ npm install --save starbot starbot-store-redis starbot-vk-adapter starbot-story-bot
const app = require('express')();
const bodyParser = require('body-parser');
const Starbot = require('starbot');
const StoreRedis = require('starbot-store-redis');
const AdapterVk = require('starbot-vk-adapter');
const StoryBot = require('starbot-story-bot');
const bot1 = Starbot({
bot: new StoryBot({
...configBot,
}),
store: new StoreRedis({
...configStore,
}),
adapter: new AdapterVk({
...configAdapter,
})
});
app.use(bodyParser.json());
app.use('/bot/telegram', bot1);
app.listen(80, function () {
console.log('Example app listening on port 80!');
});
MIT © antitim