         sendError(robot, res, err)
 
     else if inputFirst is 'vendor'
-      for vendorHash in constants.VENDORS
+      for vendorHash in Constants.VENDORS
         getVendorSaleItemCategories(res, vendorHash).then (saleItemCategories) ->
           return
         , (err) ->

      if input.length < 2
        return sendError(robot, res, 'Please specify which vendor you\'re looking up bounties for.')

      vendors = constants.BOUNTY_VENDORS[input[1]]
      if !vendors
        return sendError(robot, res, "Unable to locate vendor: #{input[1]}")

      itemCategoriesPromises = []
      for vendorHash in vendors
        deferred = new Deferred()
        getVendorSaleItemCategories(res, vendorHash).then (saleItemCategories) ->
          for category in saleItemCategories
            if category.categoryIndex in constants.BOUNTIES_CATEGORY_INDICES
              return deferred.resolve(category.salesItems)
        , (err) ->
          return deferred.reject(err)
        itemCategoriesPromises.push deferred.promise

      when.all(itemCategoriesPromises).done (bountyItems) ->
        console.log 'bountyItems = '
        console.log bountyItems

          # getItem(res, item.itemHash).then (itemDetails) ->
          #   return
          # , (err) ->
          #   return sendError(robot.res, err)

    else
      # command not recognized. Lists all available commands
      message = "Available commands are:\n"
      for command in constants.COMMANDS
        message += "`#{command}`\n"
      message += "\n#{helpText}"
      return sendError(robot, res, message)

Deferred = require('promise.coffee').Deferred
Q = require('q')
DataHelper = require './bungie-data-helper.coffee'
Constants = require './constants.coffee'

dataHelper = new DataHelper
helpText = "Check out the full README here: https://github.com/RuCray/destiny_weekly_update"
