wechaty-bot5-assistant
TypeScript icon, indicating that this package has built-in type declarations

0.2.14 • Public • Published

BOT5 Club Assistant Bot Plugin

NPM Version NPM Powered by Wechaty

BOT5 Meeting Assistant BOT powered by RSVP.ai & Wechaty & XState.

BOT5 Club

Getting Started

Step 1: Install

npm install wechaty-bot5-assistant --save

Step 2: Make a bot

$ vim mybot.js

import { WechatyBuilder } from 'wechaty'
import { Bot5Assistant } from 'wechaty-bot5-assistant'

const bot = WechatyBuilder.build()

bot.use(Bot5Assistant({
  room: [
    /^BOT5/,
  ]
}))
.on('scan', (url, code) => console.log(`Scan QR Code to login: ${code}\n${url}`))
.on('login', user => console.log(`User ${user} logged in`))
.start()

Step 3: Run

node mybot.js

Options

const DEFAULT_CONFIG = {
  // Which room(s) you want the bot to work with.
  // Can be a RegExp (for topic) or a function (filter room instance)
  // E.g. room: function (room) { room.topic().indexOf('我的') > -1 }
  room: [/BOT5/i, 'room_id@chatroom'],
}

Finate State Machine (FSM)

It's a finite state machine, which means it has a finite number of states.

Huan(202110): the above line is auto generated by GitHub Pilot.

We are trying to use XState to implement the FSM and using FSM to manage our meeting state transitions.

Currently we are just getting started, you can learn more about the BOT5 Club Meeting FSM at https://wechaty.github.io/bot5-assistant/

History

master v0.2 (Oct 29, 2021)

  1. Code init in Bot Friday Club meeting
  2. Code clean for integrating with Friday BOT
  3. Add XState FSM support

Author

Reference

Copyright & License

  • Code & Docs © 2021-now Wechaty Contributors
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

Readme

Keywords

Package Sidebar

Install

npm i wechaty-bot5-assistant

Weekly Downloads

26

Version

0.2.14

License

Apache-2.0

Unpacked Size

101 kB

Total Files

156

Last publish

Collaborators

  • zixia
  • caq9