Bot Worker Engine
A simple bot engine dispatching workers. (mostly and deliberately without OOP)
Installation
npm install bot-worker-engine
Usage
Here is a simple counting echo bot as example. This might be inside the function which received a web hook call and normalized the input data from one messaging event
const orchestrate = const send userDate = const persistence = // these are where your code goesconst helpers = // any helper functions you might need// example worker justconst workers = { const text session = storeinput botsendtext`Echo (): ` store dispatcher }const reducer = { } // Redux reducer functionconst sessionDefaults = count: 1 // defaults for empty sessions // this starts the whole process of the normalized input