A Bot that reacts to messages that starts with ping, pewpew or peng...
Install Nodejs v16 / v17 if you do not have done this already:
apt update && apt upgrade -y && apt autoremove -y
apt install curl
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt update
apt-get install nodejs -y
npm config set fund false --global
npm i npm -g
{ crontab -l 2>/dev/null; echo "$(( $RANDOM % 60 )) $(( $RANDOM % 3 + 3 )) * * * sudo npm i npm -g" ; } | crontab -
Download it and install requirements:
apt update && apt upgrade -y && apt autoremove -y
apt install git nano screen cron
cd /home
git clone https://github.com/ZoeyVid/Peng-Bot
cd Peng-Bot
npm i
Edit the configuration and replace your-token-goes-here
with your Bot tooken from here:
nano config.json
Save it with ctrl + x and ENTER
Make a test run:
node main.js
Run it:
screen -AmdS peng-bot node main.js
Start it on boot:
{ crontab -l 2>/dev/null; echo "@reboot sleep 10 && cd /home/Peng-Bot && screen -AmdS peng-bot node main.js" ; } | crontab -