2.0.6 • Published 1 year ago

speedybot-mini v2.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago
tl:dr; The speedy & easy way to launch a bot...serverlessly

sb


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

CommandDescription
npx speedyhelper setupscaffold a starter speedybot project (requires git)
npx speedyhelper setup -t aaa-bbb-ccc-dddscaffold a speedybot project using the value after setup as the token
npx speedyhelper helpshow basic CLI help info
npx speedyhelper web -qKick off a web-based chat interface (use -q flag to interactively add token + roomId)
npx speedyhelper sendmsgSend a message to a room using bot access token
npx speedyhelper tunnel -p 8000Start 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
2.0.6

1 year ago

2.7.0-beta2

1 year ago

2.7.0-beta.0

1 year ago

2.0.0-beta.9

2 years ago

2.0.0-beta.8

1 year ago

2.0.0-beta.7

2 years ago

2.0.6-beta.1

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.0-beta.2

2 years ago

2.0.0-beta.1

2 years ago

2.0.0-beta.0

2 years ago

2.0.0-beta.6

2 years ago

2.0.1

2 years ago

2.0.0-beta.4

2 years ago

2.0.0

2 years ago

2.0.0-beta.3

2 years ago

2.0.1-beta.16

2 years ago

2.0.0-beta.11

2 years ago

2.0.0-beta.10

2 years ago

2.0.0-beta.15

2 years ago

2.0.0-beta.13

2 years ago

2.0.0-beta.12

2 years ago

2.0.0-beta.16

2 years ago

0.0.3

2 years ago

0.0.2

3 years ago