         (try
           (when (or (not  @websocket)
                     (s/closed? @websocket))
-            (log/info "MetaBot WebSocket is closed. < Thread" (.getId (Thread/currentThread)) ">")
+            (log/debug "MetaBot WebSocket is closed.  Reconnecting now.")
             (connect-websocket!))
           (catch Throwable e
             (log/error "Error connecting websocket:" (.getMessage e))))

    (when-let [tokens (seq (edn/read-string (str "(" (-> s
                                                         (str/replace "“" "\"") ; replace smart quotes
                                                         (str/replace "”" "\"")) ")")))]
      (println (u/format-color 'magenta tokens))
      (apply apply-metabot-fn tokens))))


;;; # ------------------------------------------------------------ Metabot Input Handling ------------------------------------------------------------

(defn- message->command-str [{:keys [text]}]
  (u/prog1 (when (seq text)
             (second (re-matches #"^mea?ta?boa?t\s+(.*)$" text)))
    (println (u/format-color 'yellow <>))))

(defn- respond-to-message! [message response]
  (when response
    (let [response (if (coll? response) (str "```\n" (u/pprint-to-str response) "```")
                       (str response))]
      (when (seq response)
        (println (u/format-color 'green response))
        (slack/post-chat-message! (:channel message) response)))))

(defn- handle-slack-message [message]


   This will spin up a background thread that opens and maintains a Slack WebSocket connection."
  []
  (when (and (setting/get :slack-token)
             (= "true" (setting/get :metabot-enabled)))
    (log/info "Starting MetaBot WebSocket monitor thread...")
    (start-websocket-monitor!)))

