       # TODO: make hubot reply with the tags in a more meaningful way
       # since tags are returned with many concepts
       tag = tags[Math.floor(Math.random() * items.length)]
-      msg.send "Are you thinking of a #{ tag }?"
+      #msg.send "Are you thinking of a #{ tag }?"
+      msg.send responses[Math.floor(Math.random() * items.length)]
       return
     ), (error) ->
       # handle error the hubot way?

# Author:
#   Panisuan Chasinga <jo.chasinga@gmail.com>

module.exports = (robot) ->

	#clientId = "sB0wKtZj7KJZvI7_qffQUw6-am9aCFxhw7j3SkUs"
	#clientSecret = "_LXTYygWqRoC9ncEjWUDb2X6HcCZAqzDIyLhOL7k"
	clientId = CLARIFAI_CLIENT_ID
	clientSecret = CLARIFAI_CLIENT_SECRET
	grantType = "client_credentials"
	tokenUrl = "https://api.clarifai.com/v1/token/"
	tagUrl = "https://api.clarifai.com/v1/tag/"
	token = {}

	data = "grant_type=#{ grantType }&client_id=#{ clientId }&client_secret=#{ clientSecret }"

  getToken = ->
    new Promise((resolve, reject) ->
      robot.http(tokenUrl).post data, (err, res, body) ->
        if !err and res.statusCode == 200
          resolve res
        else

#   A hubot script that learns from images and videos
#
# Configuration:
#   HUBOT_CLARIFAI_CLIENT_ID
#   HUBOT_CLARIFAI_CLIENT_SECRET
#
# Commands:
#   hubot <image or video url>
