 hear = (pattern, callback) ->
   handlers.push [ pattern, callback ]
 
+descriptions = {}
+desc = (phrase, functionality) ->
+  descriptions[phrase] = functionality
+
 
 #
 # robot heart

    catch e
      console.log "Wiki error: " + e

hear /image me (.*)/i, (message) ->
  phrase = escape(message.match[1])
  url = "http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&safe=active&q=#{phrase}"

    catch e
      console.log "Weather error: " + e

desc 'wiki me PHRASE', 'returns a wikipedia page for PHRASE'
hear /wiki me (.*)/i, (message) ->
  term = escape(message.match[1])
  url  = "http://en.wikipedia.org/w/api.php?action=opensearch&search=#{term}&format=json"
