Created
April 28, 2010 10:54
-
-
Save Raynes/381998 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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