Check Here for a version that uses the new twitch API
Originally made by myself for Jeremy Dooley's Twitch/Discord Community, this handy little node script will check any streams specified once per minute and send a webhook to Discord if they're live.
- First you're going to need to Make a New Twitch Application
- Give it a clever name
- Set the Redirect URI to
http://localhost
- Accept the terms
- Copy the Client ID from you new Twitch Application and set twitchAuth.clientID to it in
config.json
(Paste it at Line 3, Column 18)- Save config.json
- Run
npm i
I'd like to think the config.json
is fairly straightforward...
- Each object in
streams
is a different streamer that the script will checkid
is the Unique Account ID of the twitch streamer (You can get this from TwitchTools)nickname
is only used internally, but makes it easier for you to distinguish which stream is whichlatestStream
is the variable modified by the program to make sure it only sends out one round of notifications per streamreceivers
is an array of sub-objects for each notification you want to send out.nickname
Again, only used internally; the nickname for this server/channel/webhook link you're sending outcustomMessage
is the message sent above the embed. If you want to ping everyone, or a certain group of users, this is where you can put that.webhook
is the actual webhook URL that you get from Discord