Egg Repository

Pterodactyl Community Egg Repository

SogeBot

sogeBot - Free Twitch Bot built on Node.js https://sogebot.xyz/

Read Me

SogeBot

Website GitHub Free Twitch Bot built on Node.js

Server Ports

1 port is required to run sogeBot.

Port default
Game (HTTP Server) 20000

NOTES

The installation take a long time, because a lot of things must be compiled. It can take 5 or more minutes !!!

Yolks
NameTag
ghcr.io/ptero-eggs/yolks:nodejs_18ghcr.io/ptero-eggs/yolks:nodejs_18
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
VersionVersion to install. Latest will install the latest available version.VERSIONlatestYesYes
Install Script
#/bin/bash
# Installscript for sogeBot | Author: [email protected]

export DEBIAN_FRONTEND=noninteractive

apt -y update
apt install -y curl unzip jq  python3 build-essential ca-certificates

mkdir -p /mnt/server
cd /mnt/server
export NODE_OPTIONS=--max-old-space-size=8192
chown -R root:root /mnt

#Backup database & config
mkdir -p .backup
cp -f .env /mnt/server/.backup
cp -f sogebot.db /mnt/server/.backup

#delete old dir's to prevent errors on update
rm -fR dest
rm -fR public
rm -fR node-modules
rm -fR tools

## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/sogebot/sogeBot/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/sogebot/sogeBot/releases")
MATCH=sogeBot

if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
    DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})
else
    VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .tag_name')
    if [ "${VERSION}" == "${VERSION_CHECK}" ]; then
        DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})
    else
        echo -e "defaulting to latest release"
        DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)
    fi
fi

echo -e "Downloading from $DOWNLOAD_LINK"
curl -sSL -o sogeBot.zip ${DOWNLOAD_LINK}

unzip -o sogeBot.zip
rm -rf sogeBot.zip


echo "--------------------------------------------------------------------------"
echo "Installing dependencies, this will take some time so sit back and relax..."
echo "IGNORE WARNINGS. THESE ARE NOT ERRORS !!!"
echo "--------------------------------------------------------------------------"

npm install -g npm@8

npm install --verbose --force

echo -e "install completed"
exit 0