Hi I’m trying to make a discord bot that sends a message when someone starts streaming and I don’t know how to do it I just this and it does not work it says i have an error with OAuth and I don’t know how to add the OAuth token there. Could someone help me, please
it says that {“error”:“Unauthorized”,“status”:401,“message”:“Client ID and OAuth token do not match”}
do i need somehow to register the token ? eather wait thanks for the replay
i dont want to bother more but its giving me a respons : {“data”:[],“pagination”:{}}
and is there some way to just get the if hes streaming some extra code or something
im so sorry for bothering again but it works in the file where i test it but in the bot it just send me a
{“access_token”:“token”,“expires_in”:numbers,“token_type”:“bearer”}
Client_ID = "client_id"
botToken = "bot_token"
head = {
'client-id': Client_ID,
'authorization': 'Bearer ' + botToken
}
r = requests.get(url=API_ENDPOINT, headers=head, )
w = r.text
if "live" in w:
await channel.send("@everyone jonasek369 is streaming go check him out !")
time.sleep(1800)
else:
print(w)
time.sleep(1)