Hi so I am trying to make a discord bot for a streamer, I am wanting the bot to see when the streamer is online I found this topichttps://discuss.dev.twitch.com/t/javascript-stream-live-check/9195/2 however I can not get it to work. Is there a way with the new API? or is this still possible?
You can use the Get Streams endpoint to see if a streamer is live https://dev.twitch.tv/docs/api/reference/#get-streams
Simply add the user_id or user_login param of the channel you’re interested in, and then if the returned data array contains a stream object it means the channel is live, if the data array is empty the channel is offline.