speedybot-mini v2.0.6
tl:dr; The speedy & easy way to launch a bot...serverlessly
Video instructions
// todo
What is this
Speedybot-mini is a deliberately limited subset of bot functionality that is intened to be deployed in serverless environments. Unlike the main speedybot library, this library does not instrument on top of the webex-node-bot-framework and does not have parity with all its features.
At the time of writing there are 4 supported methods on a handler (say, sendCard, get, post), see here for examples
{
keyword: ['hello', 'hey', 'yo', 'watsup', 'hola'],
handler(bot, trigger) {
const reply = `Heya how's it going ${trigger.person.displayName}?`
bot.say(reply)
},
helpText: `**hello** A handler that greets the user`
}
You can define a special <@submit> handler which will be triggered anytime your users send you data via adpative cards
{
keyword: '<@submit>',
handler(bot:SubmitBotInst, trigger:AATrigger) {
// Ex. From here data could be transmitted to another service or a 3rd-party integrationn
bot.say(`Submission received! You sent us ${JSON.stringify(trigger.attachmentAction.inputs)}`)
},
helpText: `A special handler that fires anytime a user submits data (you can only trigger this handler by tapping Submit in a card)`
}
Not included in this release in a serverless environment:
- spawn/despawn events
- handle file uploads
- various details related to membership
- All the other bot methods
CLI Instructions
Command | Description |
---|---|
npx speedyhelper setup | scaffold a starter speedybot project (requires git) |
npx speedyhelper setup -t aaa-bbb-ccc-ddd | scaffold a speedybot project using the value after setup as the token |
npx speedyhelper help | show basic CLI help info |
npx speedyhelper web -q | Kick off a web-based chat interface (use -q flag to interactively add token + roomId) |
npx speedyhelper sendmsg | Send a message to a room using bot access token |
npx speedyhelper tunnel -p 8000 | Start an nGrok tunnel, defaults to port 8000 |
Rather than using npx, you can perform a global install which install speedyhelper to your path
npm i -g speedyhelper
yarn global add speedyhelper
Make sure all worked well by opening a new terminal and entering:
speedyhelper help
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago