Closed jywarren closed 6 years ago
Sure! We could modify the core to make it accept an array of strings for a behavior as compared to a single string or sth and then make a behavior that can accept multiple triggers.
Or perhaps add another function in the core to aid the programmer in adding simpler mini-behaviors?
Which do you think would make for the simplest way to submit a new behavior? I imagine even a one-line change could be possible, no?
On Thu, Mar 22, 2018, 8:53 AM Ujjwal Sharma notifications@github.com wrote:
Sure! We could modify the core to make it accept an array of strings for a behavior as compared to a single string or sth and then make a behavior that can accept multiple triggers.
Or perhaps add another function in the core to aid the programmer in adding simpler mini-behaviors?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plotsbot/issues/95#issuecomment-375293119, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ3dPSJ9-UqWFHks8q4irps62R0oeks5tg56dgaJpZM4S1vYE .
Also, potentially as a next step a function could be passed instead of a response string and it could produce a simple dynamic response, like:
"trigger phrase": function response(user, message) { return responseString; }
But simple string response is even easier as a first step.
I think doing this could be a great way to encourage new behavior submission and start getting more people working on plotsbot - a nice simple onramp!
@jywarren sounds great! Let me dive into it.
Awesome!!!
In Slack, the
slackbot
can be configured to respond to a list of keyword triggers in a simple format, where you type the trigger words and then the string that's returned:cat
=>Hi there, a cat is a pet.
file an issue
=>Want to file a GitHub issue? https://github.com/publiclab/plots2/issues/
It'd be great to be able to add simple behaviors to
plotsbot
by just adding a single line like this to a "keywords" list. What do you think?