discord.ext.commands.errors.commandinvokeError: comando planteado una excepción: jsondecodeError: Valor esperando: línea 1 columna 1 (char 0)
import requests
response = requests.get(url)
response.raise_for_status() # raises exception when not a 2xx response
if response.status_code != 204:
return response.json()
///////////////////////////////////////////
if (
response.status_code != 204 and
response.headers["content-type"].strip().startswith("application/json")
):
try:
return response.json()
except ValueError:
# decide how to handle a server that's misbehaving to this extent
SECRET MYSTERY