项目作者: Notekunn

项目描述 :
Bot framework for personal bot
高级语言: TypeScript
项目地址: git://github.com/Notekunn/ezbot.git
创建时间: 2021-02-16T17:39:55Z
项目社区:https://github.com/Notekunn/ezbot

开源协议:

下载


EZ BOT - MAKE BOT EASIER

Framework for personal bot

  1. npm i --save @vnbot/ezbot
  1. const { Bot } = require('@vnbot/ezbot');
  2. const config = require('config');
  3. const path = require('path');
  4. const bot = new Bot({
  5. email: config.get('email'),
  6. password: config.get('password'),
  7. appStatePath: path.resolve(__dirname, '../appstate.json'),
  8. });
  9. bot.on('message', (payload, chat) => {
  10. const text = payload.body;
  11. chat.say(`Echo: ${text}`);
  12. });
  13. bot.start();

More examples

  1. cd examples
  2. node echo-bot