Skip to content

Instantly share code, notes, and snippets.

@Raynes
Created April 28, 2010 10:54
Show Gist options
  • Save Raynes/381998 to your computer and use it in GitHub Desktop.
Save Raynes/381998 to your computer and use it in GitHub Desktop.
(defplugin
(:dict
"Takes a word and look's up it's definition via the Wordnik dictionary API."
["dict"]
[{:keys [irc channel nick args]}]
(ircb/send-message irc channel
(str nick ": "
(let [[text part] (lookup-def (first args))]
(if (seq text) (str part ": " text) "Word not found."))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment