 #
 Init = (robot) ->
     if not STEAM_API_KEY?
-        return robot.logger.error "Missing STEAM_API_KEY in environment. Please set and try again."
+        return robot.logger.error "hubot-steam-webapi: Missing STEAM_API_KEY in environment. Please set and try again."
 
     GetHeroes robot, (heroes) ->
         DOTA_HEROES = heroes

                target = _GetPlayer communityID, match.players
                hero = DOTA_HEROES[target.hero_id] or "No hero"
                # TODO: W / L TBA
                msg.send "Match ID: #{match.match_id} | Lobby: #{DOTA_LOBBIES[match.lobby_type]} | Hero: #{hero} | #{date}"

    # GET Player Dota 2 match details
    robot.respond /dota match (\d+)\s*(.+)?/i, (msg) ->
        matchID = msg.match[1]
        genericID = msg.match[2]
        GetMatchDetails msg, matchID, (match) ->
            date = moment.unix(match.start_time).fromNow()
            duration = moment.duration(match.duration, "seconds").minutes()
            firstBlood = moment.duration(match.first_blood_time, "seconds").humanize()

    Init robot

    # GET 32-bit Steam ID
    robot.respond /steam id( me)? (.+)/i, (res) ->
        customURL = res.match[2]
        GetSteamID res, customURL, (steamID) ->
            res.reply "#{_PossessionModifier(customURL)} Steam ID is: #{steamID}"

    # GET Steam profile status
    robot.respond /steam status (.+)/i, (res) ->
        genericID = res.match[1]
        GetPlayerSummaries res, genericID, (player) ->
            status = _GetStatus player.personastate, player.communityvisibilitystate
            lastOnline = moment.unix(player.lastlogoff).fromNow()
            res.reply "#{genericID} belongs to #{player.personaname} who is currently #{status} and was last online #{lastOnline}."

    # GET Player Dota 2 match history (overview)
    robot.respond /dota history (.+)/i, (res) ->
        genericID = res.match[1]
        GetMatchHistory res, genericID, (steamID, history) ->
            communityID = _GetCommunityID steamID

            for match in history.matches
