Skip to content

Conversation

@BenDMyers
Copy link
Member

No description provided.

Comment on lines +2 to +9
"5t3phDev",
"BuildingBedrockLayout",
"lunchdev",
"marbiano",
"SomeAnticsDev",
"stepzen_dev",
"ThoriumSim",
"TrostCodes"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got FOMO here 😿

Comment on lines +12 to +23
async function isStreaming(channel) {
const {
data: { data: streams },
} = await axios.get(`https://api.twitch.tv/helix/streams?user_login=${channel}`, {
headers: {
'Client-ID': process.env.TWITCH_CLIENT_ID,
Authorization: `Bearer ${accessToken}`,
},
});

return streams.length > 0;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to throw in a catch here and return false for safety

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants