Answer the question
In order to leave comments, you need to log in
How do I list steam inventory items?
There is a function that returns a list of items from the steam inventory for a given steamid:
def getInventory(steamid):
data = urllib.request.urlopen('http://steamcommunity.com/profiles/'+steamid+'/inventory/json/730/2')
json_data = json.loads(data.read())
descriptions = json_data['rgDescriptions']
print([descriptions[v]['name'] for v in descriptions])
return
@dp.message_handler(commands=['inventory'])
async def process_inventory_command(message: types.Message):
tired = inventory.getInventory('76561198928902730')
await message.reply('Содержимое инвентаря: ' +str(tired))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question