tonyvanriet / lunch-bot Goto Github PK
View Code? Open in Web Editor NEWA Slack bot that manages group lunch activity
License: MIT License
A Slack bot that manages group lunch activity
License: MIT License
@tonyvanriet claims that he did this at some point. Should be an easy thing with clojure.core/distinct
Exception trying to handle slack message
{:source_team "T88PYL9GT", :event_ts "1563457866.000800", :channel "D8LKMURNE", :type "message", :ts "1563457866.000800", :team "T88PYL9GT", :client_msg_id "636a44c8-0b41-4b55-8530-6eb72e98ec62", :user_team "T88PYL9GT", :user "U88AYD6DP", :suppress_notification false, :text "choose BW3"}.
#<TimeoutException java.util.concurrent.TimeoutException: timed out after 60000.0 milliseconds>
java.util.concurrent.TimeoutException: timed out after 60000.0 milliseconds
at manifold.deferred$timeout_BANG_$fn__3247.invoke (deferred.clj:1082)
manifold.time$eval2672$in__2675$f__2676.invoke (time.clj:144)
clojure.lang.AFn.run (AFn.java:22)
java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (ScheduledThreadPoolExecutor.java:180)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:293)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
manifold.utils$thread_factory$reify__2552$fn__2554.invoke (utils.clj:25)
clojure.lang.AFn.run (AFn.java:22)
java.lang.Thread.run (Thread.java:748)
after choose, the bot does some reconnecting for a while and then can take today
and friends
Once you choose a restaurant, you should be able to specify a number of diners:
@lunchbot choose shake shack
@lunchbot today 12
Then in the today/0
command, in addition to showing who's in, lunch-bot should show how many people are in of the number of specified diners:
today
;=> Ordering Shake Shack
;=> ...
;=> 10 of 12 peolple are **in**
๐พ on success
dunno what to call the command but it'd be nice
Ideally it'd just be order last
, but I can't garauntee that there isn't a restaurant out there that sells an item called "The Last." So I'd also settle for order-last
or reorder [# to re-order]
if events.edn is missing or has zero sized, lunch-bot fails with:
(start)
NullPointerException java.util.regex.Matcher.getTextLength (Matcher.java:1283)
(print-stack-trace *e)
java.lang.NullPointerException: null
at java.util.regex.Matcher.getTextLength (Matcher.java:1283)
java.util.regex.Matcher.reset (Matcher.java:309)
java.util.regex.Matcher.<init> (Matcher.java:229)
java.util.regex.Pattern.matcher (Pattern.java:1093)
java.util.regex.Pattern.split (Pattern.java:1206)
java.util.regex.Pattern.split (Pattern.java:1273)
clojure.string$split.invoke (string.clj:222)
clojure.string$split_lines.invoke (string.clj:230)
lunch_bot.store$edn__GT_maps.invoke (store.clj:52)
lunch_bot.store$read_maps.invoke (store.clj:75)
lunch_bot.store$read_events.invoke (store.clj:78)
lunch_bot.event$initialize_events.invoke (event.clj:12)
lunch_bot.core$start.invoke (core.clj:210)
lunch_bot.core$start.invoke (core.clj:207)
lunch_bot.core$eval10674.invoke (form-init1971661883669074996.clj:1)
clojure.lang.Compiler.eval (Compiler.java:6703)
clojure.lang.Compiler.eval (Compiler.java:6666)
clojure.core$eval.invoke (core.clj:2927)
clojure.main$repl$read_eval_print__6625$fn__6628.invoke (main.clj:239)
clojure.main$repl$read_eval_print__6625.invoke (main.clj:239)
clojure.main$repl$fn__6634.invoke (main.clj:257)
clojure.main$repl.doInvoke (main.clj:257)
clojure.lang.RestFn.invoke (RestFn.java:1523)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__9613.invoke (interruptible_eval.clj:67)
clojure.lang.AFn.applyToHelper (AFn.java:152)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.core$apply.invoke (core.clj:624)
clojure.core$with_bindings_STAR_.doInvoke (core.clj:1862)
clojure.lang.RestFn.invoke (RestFn.java:425)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:51)
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__9655$fn__9658.invoke (interruptible_eval.clj:183)
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__9648.invoke (interruptible_eval.clj:152)
clojure.lang.AFn.run (AFn.java:22)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
java.lang.Thread.run (Thread.java:745)
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.