Skip to content

ardcsx/tgnodewrt

Repository files navigation

tgnodeWRT

Personal telegram bot for openwrt

Usage

Auto Install tgnodeWRT

wget https://raw.githubusercontent.com/ardcsx/tgnodewrt/main/install.sh -O /bin/tgnodewrt && chmod +x /bin/tgnodewrt
tgnodewrt -i

Install NodeJS

opkg update
opkg install node node-npm vnstat vnstati git git-http

Install Nodejs Package

npm i -g yarn pm2

Install bot

  1. Clone this repository
    git clone https://github.com/ardcsx/tgnodewrt.git
  2. Install dependencies (yarn or npm install)
  3. edit .env file, change TOKEN and ADMIN_ID
  4. Start the development environment
    npm run dev or yarn dev

Auto start on boot

cp /root/tgnodewrt/etc/init.d/tgnodewrt /etc/init.d/
/etc/init.d/tgnodewrt enable
/etc/init.d/tgnodewrt start

Crontab setting

/root/tgnodewrt/bot.sh
Telegram NodeJS Openwrt Menu

1) add bot crontab        3) add speedtest crontab  5) install bot
2) del bot crontab        4) del speedtest crontab  6) Quit

Speedtest every 1 hour

Add to scheduled task

0 */1 * * *  /root/tgnodewrt/command/sh/speed.sh

Bot command

Main command

/ping - bot response time
/system_info - router system information
/modeminfo - allcatel modem information
/my_ip - IP information
/speedtest - run speedtest ookla
/speeedtest_log - get speedtest log
/vnstat - show vnstat menu
/restart_bot - restart tgnodeWRT bot
/restart - restart router

Bash command

.bash {cmd}

Cek Kuota XL

/kuotaxl - cek informasi no xl
!setxl (nohp) - set no xl

Extra command

.tts {text} - text to speech

About

Personal telegram bot for openwrt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors