perlgatory / lunchinator Goto Github PK
View Code? Open in Web Editor NEWA Slack Integration for Lunch Groups
A Slack Integration for Lunch Groups
Bots can't post to channels they aren't in. We manually invited the lunchinator to chunky_bacon, but to make it useful in other channels, it should probably join the channel automatically when summoned.
Looks like the appropriate API call can be found here: https://api.slack.com/methods/channels.join
Perhaps unleashing lunchinator with "thunderclound_and_rain" or "rain_cloud" should suggest ordering delivery rather than going out for lunch in your /lunch invocation.
Right now, it just checks for reactions after a hardcoded time window. Accept a departure time in the initial slash command and create the group DM ~5 (10?) minutes before the scheduled departure time. We discussed using the chronic gem for this: https://github.com/mojombo/chronic
To properly understand that once unleashed, there is no going back, lunchinator needs a profile image.
The initial lunch request displays the time in the user's timezone. Later messages (upon group departure) use UTC. We should be more consistent about this and use a consistent time zone across all messaging for a single lunch group.
Using the verification token in the request, the server should make sure that the initial /lunch
command actually originated from slack. This is simple and documented here: https://api.slack.com/slash-commands under "Validating the command"
This could be accomplished by either including the bot's user id in the list of users when creating the group chat, or alternative as recommended by @ahwagner having the bot react to its own message: https://api.slack.com/methods/reactions.add
If a user invokes lunchinator and there are other lunchinator lunch groups that:
Lunchinator responds with a confirmation dialogue and a list of links to the qualifying groups.
If one attempts to create a lunch group but has to confirm due to another lunch group existing, that confirmation will still be processed after the target lunch time has passed. In this event it creates a lunch prompt that will never trigger!
dependent on #9
This is bad. Not only are you friendless, but you are leaving cruft in our otherwise pristine database.
During a recent Perlgatory we made some test lunch groups which accumulated ๐s. However because we deployed an update, lunchinator never created the group message for the participants. If there happened to be a real lunch group that day, the potential lunchgoers would've been saddened by this result!
a user should be able to do /lunch subscribe [optional time range] to the next available lunch group they can participate in or that is within the designated time range.
Proposal: use an @
to separate the time from a "destination" and parse the latter out before sending the user input to Chronic.
This will look more official, will circumvent our use of :keycap_ten:
, and might enable our "where have we been?" tracking!
It should be an option to delete your own lunch request if someone suggests a different lunch plan and you want to cancel your own existing one that is currently open.
"From my cold, dead hands!" - if the second group is smaller than the first lunch group
If group 2 wins, somehow use the custom :harpoon: emoji.
currently it stays in the channel it was called in--which can be confusing if invoked several days in a row on a low-volume channel.
If a user invokes luncinator and there are other lunchinator lunch groups that:
Lunchinator responds with a confirmation dialogue and a list of links to the other events.
Currently the " wants to go to lunch at " persists even after the lunch group has been assembled and a new user +1'ing the request can't actually join anymore. We should, at assemble time, update this message to reflect this new state. Maybe mention the initiating user so that anyone that still wants to join can contact that person directly.
see @susannasiebert for details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.