 
   makeRequest bot, endpoint, (response) ->
     data = response.data
+
+
     itemInstanceId = data.items[weaponSlot].itemId
     deferred.resolve(itemInstanceId)
 

      getPlayerId(res, '2', displayName, robot)
    ]).then (results) ->
      if results[0] && results[1]
        robot.send {room: res.message.user.name}, "Mutiple platforms found for: #{displayName}. use xbox or playstation"
        deferred.reject()
        return
      else if results[0]

            robot.emit 'slack-attachment', payload



checkNetwork = (network) ->
  xbox = ['xbox', 'xb1', 'xbox1', 'xboxone', 'xbox360', 'xb360', 'xbone']
  playstation = ['playstation', 'ps', 'ps3', 'ps4', 'playstation3', 'playstation4']
  if network in xbox
    return '1'
  else if network in playstation
    return '2'
  else
    return null

checkWeaponSlot = (slot) ->
  if slot is 'primary'
    return 1
  else if slot in ['special', 'secondary']
    return 2
  else if slot is 'heay'
    return 3
  else
    return null

# Sends error message as DM in slack
sendError = (robot, res, message) ->
