sm-bot-framework v1.0.0
Smart Multifunction Bot Framework
This is a framework make you create chatbot more easily.
Flexible - Build your own plugin and use it at any time
Intelligent - Use NLP to perform situational conversation
Modern - Source written with ES6/ES7 syntax and great async await supports.
Multifunction - Use multiple plugins at the same time
Requirements
The framework highly depends on async function syntax, the use of sql and ssl server, so you must make sure your runtime meets the following requirements:
Community
You can discuss anything about sm-bot-framework or chatbot development in our Discord Server. Join now!
Documentation
You can find the framework documentation on the website.
Examples
// Bot.js
// bot settings
const
plugin = require('./plugin_manager.js'),
base = require('./base.js'),
server = base.server,
bot = new base(8080);
server.post('/', async function(req, res, next){
bot.lineVerify(req, res);
let platform = bot.getPlatform(req);
bot.connect(platform, req, res);
reply = await bot.messageHandler(platform, 'Hello world!');
bot.sendAPI(platform, 'reply', req, reply);
});
server.get('/', function(req, res, next){
bot.fbSubscribe(req, res);
});
Build the script under the main folder, run and remember to set your key in key_config.ini.
Contributing
Pull Requests and issue reports are welcome. You can follow steps below to submit your pull requests:
Fork, then clone the repo:
git clone git@github.com:your-username/sm-bot-framework.git
Install the dependencies:
cd sm-bot-framework
yarn
Make sure the tests pass (including eslint, flow checks and jest tests):
yarn test
Make your changes and tests, and make sure the tests pass.
4 years ago