     [clojure.string    :as str]
     [jubot.adapter     :as ja]
     [jubot.handler     :as jh]
+    [jubot.brain       :as jb]
     [jubot.scheduler   :as js]
     [panpan.util.match :refer :all]
     [panpan.toggl.api  :as toggl]))

(def ^:const REST_PID "3141045")
(def ^:const WARN_SEC (* 25 60)) ; 25 min
(def ^:const REST_WARN_SEC (* 5 60)) ; 5 min


(def ^:const MESSAGES ; {{{

    #"^(.+?).*(を)?(開始|始め|はじめ)"
    (matchfn [desc]
      (toggl/start-entry desc :pid (desc->pid desc))
      (jb/set RUNNING_KEY "true")
      (->> MESSAGES :start-entry rand-nth (out "@" user " ")))
    #"^(再開|さいかい)"
    (matchfn []
