Youtube to Discord webhooks
CALLBACK
- the URL your HTTP server is listening onHOOKURL
- the URL to the Discord webhook (what's this?)
PORT
- change the port of the HTTP listener, 8000 by defaultCHID
- Youtube ID of the channel you want to subscribe to, UC1CSCMwaDubQ4rcYCpX40Eg by defaultUA
- the user-agent string used when making the POST request to Discord, ytdsc by default; you probably shouldn't change this
$ npm install
$ CALLBACK=http://example.com:8000/ HOOKURL=https://discordapp.com/api/webhooks/... CHID=UCS1mJfvqhIuv0-MREnvTZIA node hook.js
[Unit]
Description=Youtube Uploads to Discord Webhooks
After=network-online.target
Wants=network-online.target
[Service]
Environment="CALLBACK=http://example.com:8000/"
Environment="CHID=UC1CSCMwaDubQ4rcYCpX40Eg"
Environment="HOOKURL=https://discordapp.com/api/webhooks/..."
TimeoutStartSec=0
ExecStart=/usr/bin/node hook.js
SyslogIdentifier=ytdsc
WorkingDirectory=/path/to/ytdsc
Restart=on-failure
RestartSec=30s
StandardOutput=journal
StandardError=journal
KillSignal=SIGINT
[Install]
WantedBy=multi-user.target