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”}
@tasks.loop(seconds=10)
async def check_For_live_jonasek369(ctx):
channel = bot.get_channel(673138335614631948)
API_ENDPOINT = “https://api.twitch.tv/helix/streams?user_login=jonasek369”
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)