Skip to content

Mist-Rain/Bot-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Multifunction Bot Framework

This is a framework make you create chatbot more easily.

Support FB and LINE platform.

  • Multifunction - Build your own plugin and use it at any time

  • Flexible - Use multiple plugins at the same time

  • Intelligent - Use NLP to perform situational conversation

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:

Documentation

You can find the framework documentation on the website.

Examples

// Bot.js
// bot settings
const
  connection_manager = require('./connection_manager.js'),
  server = connection_manager.server,
  bot = new connection_manager(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, remember to set your key in the file key_config.ini and run js file with the command node <filename>.js.

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 [email protected]: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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published