         createURL = (game) ->
             "http://www.twitch.tv/directory/game/#{encodeURIComponent(game)}"
 
-        twitch_request msg, "/games/top", limit: maxResults, (object) ->
+        twitchRequest 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)}"
 
-twitch_request = (msg, api, params = {}, handler) ->
+twitchRequest = (msg, api, params = {}, handler) ->
     msg.http("https://api.twitch.tv/kraken#{api}")
         .query(params)
         .get() (err, res, body) ->


    robot.respond /ttv search (.+)/i, (msg) ->
        query = msg.match[1]
        twitch_request msg, "/search/streams", { q: query, limit: maxResults }, (object) ->
            if object._total is 0
                msg.reply "No live streams were found using search query: \"#{query}\". Try a different query or try again later."
                return

                msg.reply "There are #{object._total - maxResults} other live streams matching your search query: \"#{query}\"."

    robot.respond /ttv stream (.+)/i, (msg) ->
        twitchRequest msg, "/streams/#{msg.match[1]}", null, (object) ->
            if object.status is 404
                msg.reply "The stream you have entered (\"#{msg.match[1]}\") does not exist."
                return
