Simple self-hosted client that takes in Twitch EventSub websocket requests and sends out Discord webhook requests
- NodeJS 24.x or higher
- An account for chat access (your broadcaster account works, though you can also make an alt)
- A Twitch dev app
- Twitch tokens using your dev app's client ID and secret
- A bit of knowledge about SQLite
The current example.env looks like this:
CLIENT_ID= # your twitch dev app's ID
CLIENT_SECRET= # your twitch dev app's secret
CALLBACK_URL= # redirect url in your twitch dev app
CHANNEL_NAME= # your channel's username
USER_ID= # your channel's user ID
BOT_USERNAME= # chat bot username, optional
DISCORD_HOOK= # your discord webhook urlThis app uses the server-sent events API for communicating between the frontend and backend. Previously we used websockets via socket.io, which NginX had issues with. This version should do better now thankfully!
- Clone this repo to your host
- Copy the
example.env, rename to.env, and supply the correct info - Run
npm installto install dependencies - Grab an access token and refresh token from https://twitchtokengenerator.com, insert them into the
db.sqlite.examplewhere relevant (see: users table), and rename it to justdb.sqlite - Configure anything else you need to keep the client running on a VPS/computer
- Run
node indexto get it up and running
If you have an alt account, you can test that it's working by following your main and making sure that the webhook runs. If it's working, then you're all set! The app handles everything necessary for staying subscribed to events, so you can just leave it running for whenever you stream
If you need support, feel free to open an issue! However, please note that we can not provide support related to hosting- we can only help if something directly related to the program breaks
If you'd like to support us, we've got a Patreon and a Ko-Fi you can chuck some money at, if you're interested. No pressure though 🧡