         createURL = (game) ->
             "http://www.twitch.tv/directory/game/#{encodeURIComponent(game)}"
 
-        twitch_request msg, "/games/top", limit: 5, (object) ->
+        twitch_request msg, "/games/top", limit: maxResults, (object) ->
             for gameObj, i in object.top
                 msg.send "#{i + 1}. #{gameObj.game.name} | Viewers: #{gameObj.viewers} | Channels: #{gameObj.channels} | #{createURL(gameObj.game.name)}"
 


module.exports = (robot) ->
    maxResults = 5

    robot.respond /ttv featured/i, (msg) ->
        twitch_request msg, '/streams/featured', limit: maxResults, (object) ->

#   None
#
# Commands:
#   hubot ttv fav - Returns information about your five favourite streams (tracking)
#   hubot ttv fav <add|rm> <name> - <Add> or <rm> stream <name> to/from your list of five favourite streams
#   hubot ttv featured - Returns the first 5 featured live streams
#   hubot ttv game <category> - Returns the first 5 live streams in a game <category> (case-sensitive)
#   hubot ttv search <query> - Returns the first 5 live streams matching the search <query>
