asyncvoter-slack-bot's Issues
persist the vote info
As an admin or user
So that we don't lose critical vote information
I would like the vote information to be persisted
Could be sent to RESTful endpoint
make existing cukes more aware of channels the bot and user is in
probably want to use the newly forked npm module for botkit on av
full feature user stories at the top of each cuke
I think the key addition now is the full feature user stories at the top of each cuke, and a gradual polishing to more declarative cukes:
http://itsadeliverything.com/declarative-vs-imperative-gherkin-scenarios-for-cucumber
also pulling in a bigger set of other stories
prompt vote after inactivity
maybe after 12 hours with no votes - should prompt in channel
add cucumber testing
We've got a yada outline in place, but needs some work to hook it out and help make the high level stories nice and clear
add error handling
@chaiwa-berian makes a great point that we should have some general error handling when instructions fail, so the bot can respond with some helpful instructions when there's a fail
failure on server
When @mtc2013 was testing we got this failure:
ubuntu@ip-172-31-35-239:~/async_slack_bot$ { type: 'message',
channel: 'D35B4MGCU',
user: 'U02B6JMJ6',
text: 'vote results',
ts: '1481754694.000008',
team: 'T0285CSTT',
event: 'direct_message',
match: [ 'vote', index: 0, input: 'vote results' ] }
/home/ubuntu/async_slack_bot/server.js:57
vote = message.text.match(/\d+/)[0]
^
TypeError: Cannot read property '0' of null
at Object.controller.hears.response (/home/ubuntu/async_slack_bot/server.js:57:35)
at Object.<anonymous> (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:852:28)
at Object.Botkit.botkit.trigger (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:879:49)
at Object.<anonymous> (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/SlackBot.js:720:34)
at Object.Botkit.botkit.trigger (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:879:49)
at /home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:983:32
at Object.bot.findConversation (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/Slackbot_worker.js:678:9)
at /home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:979:21
at next (/home/ubuntu/async_slack_bot/node_modules/botkit/node_modules/ware/lib/index.js:82:27)
at Ware.run (/home/ubuntu/async_slack_bot/node_modules/botkit/node_modules/ware/lib/index.js:88:3)
get a test harness in place for slack bot
need to test this code - what we have so far is a spike
replace botkit-mock
would like the URL to be hyperlinked
should be relatively easy with the slack syntax
throttling the messages and instructions
it would be nice if the bot avoided reposted the instructions etc. if they had been posted recently
hosted on drie push votes were stored, but we didn't get channel prompts
more details here: drie/push-issues#2
bug: name not found
{ type: 'message',
channel: 'D33U268KG',
user: 'U0292M7AC',
text: 'vote 3',
ts: '1480511500.000046',
team: 'T0285CSTT',
event: 'direct_message',
match: [ 'vote', index: 0, input: 'vote 3' ] }
info: ** API CALL: https://slack.com/api/chat.postMessage
info: ** API CALL: https://slack.com/api/chat.postMessage
info: ** API CALL: https://slack.com/api/chat.postMessage
info: ** API CALL: https://slack.com/api/chat.postMessage
start new vote "API - create user" <https://www.pivotaltracker.com/story/show/134581147>
/home/ubuntu/async_slack_bot/server.js:50
story.name = match[1]
^
TypeError: Cannot read property '1' of null
at Object.controller.hears.vote (/home/ubuntu/async_slack_bot/server.js:50:21)
at Object.<anonymous> (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:852:28)
at Object.Botkit.botkit.trigger (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:879:49)
at Object.<anonymous> (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/SlackBot.js:739:38)
at Object.Botkit.botkit.trigger (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:879:49)
at /home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:983:32
at Object.bot.findConversation (/home/ubuntu/async_slack_bot/node_modules/botkit/lib/Slackbot_worker.js:678:9)
at /home/ubuntu/async_slack_bot/node_modules/botkit/lib/CoreBot.js:979:21
at next (/home/ubuntu/async_slack_bot/node_modules/botkit/node_modules/ware/lib/index.js:82:27)
at Ware.run (/home/ubuntu/async_slack_bot/node_modules/botkit/node_modules/ware/lib/index.js:88:3)
restart slack bot after crash
at the moment a regex mismatch will bring down the bot ... :-(
support multiple parallel votes
arguably we need the existing functionality wrapped in tests first ...!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.