discljord.util

*enable-logging*

dynamic

deprecated

Dynamic var to allow you to disable logging entirely.
Set in a binding form around the calls to start-connection! and
connect-bot!

bot-token

(bot-token token)
Takes a bot token, and returns the token value that can
be used in the "Authorization" header for HTTP calls.

clean-json-input

(clean-json-input j)
Takes in arbitrary JSON data, from clojure.data.json/read-str or similar,
and conforms it to a more idiomatic Clojure form.

Strings and numbers simply return themselves.
Objects have their keys and values recursively conformed.
Objects with string keys are converted to maps with keyword keys, except for snowflakes.
Arrays are converted to vectors with each element recursively conformed.

derefable-promise-chan

(derefable-promise-chan)(derefable-promise-chan xform)(derefable-promise-chan xform ex-handler)
Creates an implementation of [[clojure.lang.IDeref]] which is also a core.async chan.

json-keyword

(json-keyword s)
Takes a string and converts it to a keyword.
The resulting keyword will consist entirely of lower-case letters,
and replaces underscores with dashes.

Results in an unreadable keyword if the string contains spaces.

parse-if-str

(parse-if-str input)

set-logging-level!

deprecated

(set-logging-level! logging-level)
Sets the logging level for discljord through tambre.
Levels are :trace, :debug, :info, :warn, :error, :fatal, and :report