I'm sorry just asking like this, but I'm new to JSON and API-related Stuff.
@bot.command()
async def insult(ctx):
resp = requests.get("https://insult.mattbas.org/api/insult")
if 300 > resp.status_code >= 200:
content = resp.json() #We have a dict now.
else:
content = f"Recieved a bad status code of {resp.status_code}."
await ctx.send(content)
The API displays plain text and I can't figure out how to get it. I can however get other API results which do not have plain text.
Please help.