Discord.Ext.Commands.Errors.CommandInvokeError: Commande a soulevé une exception: JSondeCodeError: Valeur attente: ligne 1 colonne 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