Linux JS Script for getting notifications on Discord when a specific github repository drops a new release
mkdir -p /home/discord-bots
cd /home/discord-bots
sudo apt install nodejs npmsudo npm install -g pm2npm install node-fetch@2cd /home/discord-bots
nano github.jsPaste the script from here:
https://github.com/seeuinhell95/Github-Releases-Discord-Alerts/blob/main/github.js
Add your discord webhook here:
// Webhook URL
const WEBHOOK_URL = "YOUR-DISCROD-WEBHOOK-URL";Add Github repositories you want to get notifications when a new release has been dropped:
// GitHub repositories to monitor
const REPOS = [
"YOUR-REPO1", // No url needed, just author/reponame
"YOUR-REPO2"
];cd /home/discord-bots
pm2 start github.js --name github-release-bot
# Check if its online:
pm2 list
# You should see something like this:
βββββββ¬ββββββββββββββββββββββ¬βββββ¬βββββββ¬βββββββββ¬βββββββ¬βββββββββ
β id β name β... βstatusβ cpu β mem β ... β
βββββββΌββββββββββββββββββββββΌβββββΌβββββββΌβββββββββΌβββββββΌβββββββββ€
β 0 β github-release-bot β... βonlineβ 0% β 30MB β ... β
βββββββ΄ββββββββββββββββββββββ΄βββββ΄βββββββ΄βββββββββ΄βββββββ΄βββββββββ