Ich habe eine Rest API abfrage in meinen Discordbot eingefügt jedoch bekomme ich immer Fehler.
Code: Alles auswählen
if message.content == "$help":
async with aiohttp.ClientSession() as session:
async with session.get('https://api.truckersmp.com/v2/servers') as resp:
await message.channel.send(resp.status)
await message.channel.send(resp["response"][0]["id"])
Code: Alles auswählen
await message.channel.send(resp["response"][0]["id"])
TypeError: 'ClientResponse' object is not subscriptable