Discord.ext.commands.errors.commandinvokeerror: Команда подняла исключение: jsondecodeerror: ожидание значения: строка 1 Столбец 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