(ns yetibot.commands.chatoms
  (:require
    [yetibot.core.hooks :refer [cmd-hook]]
    [yetibot.core.util.http :refer [get-json]]))

(def endpoint "+There=4&Love=2&Personal=2")

(defn chat-cmd
  "chat # ask a question from chatoms.com"
  {:yb/cat #{:fun :broken}}
  [_] (:text (get-json endpoint)))

(cmd-hook #"chat"
          _ chat-cmd)

(ns yetibot.commands.chatoms
  (:require
    [yetibot.core.hooks :refer [cmd-hook]]
    [yetibot.core.util.http :refer [get-json]]))

(def endpoint "+There=4&Love=2&Personal=2")

(defn chat-cmd
  "chat # ask a question from chatoms.com"
  {:yb/cat #{:fun :broken}}
  [_] (:text (get-json endpoint)))

(cmd-hook #"chat"
          _ chat-cmd)
