Giveaway overlay used on RSB Streams
Simple Webscript overlay we used on our first giveaway event and might use it again in the future. Node.js is needed.
- Download and install Node.js
- Open command prompt window inside the project directory with
Shift + Right Click
- Run the following command
npm i
- Create a .env file in the root, it should have a structure like...
CHANNEL=YourTwitchChannel
OAUTH_USER=yourTwitchUsername
OAUTH_SECRET=###OUAHTSECRET###
VIEWERS=
KEYWORD=plat
RESTRICT_FROM_MODS=true
CALLERS=yourTwitchUsername
TRIGGER=!gstart
ANNOUNCE_ON_JOIN=false
ANNOUNCE_ROLLS=false
ANNOUNCE_WINNER=false
ICON_URL=https://path.to.your.logo.ml
SECRET=reallyreallyreallySECUREPIECEofLoTsOFTEXt!!one!1!!
- Change
OAUTH_USER
to your Twitch username,OAUTH_SECRET
to your oath2 key which you can get here andCHANNEL
to your own Twitch channel. - Change
SECRET
to something you choose.
- Edit the JSON file
data.json
and add your rewards inprizes:[]
just as a regular JavaScript array
- Open command window in the project directory
- Run the overlay server with
node server.js
- Run OBS and add a new Browser Source, linking
http://localhost:3000/static/index.html?secret=SECRET
(SECRET will be whatever you put in further up) - When you want to roll it:
- Right click the source, select Interact then press your spacebar
- Or use the configured
TRIGGER
phrase. This is configurable.
You can find me on Discord Monskiller#8879
.
Tobiah#0001 did a bunch of changes to make it more modular without touching code. Feel free to reach out to me too.
- Do all of the main setup steps
- Run
npm run dev
in your terminal to start a dev session with automated restarts.