Skip to content

heathscliff334/server_telegram_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Bot

a Telegram bot that can provide us manage our server

Installation Guides

Prerequisites

Python 3.6 or higher installed on your system.

sudo apt update
sudo apt install python3 python3-pip
sudo apt install python3-venv

Recommended installing Python 3.10

  • Create a telegram bot on BotFather by sending /newbot command.

Create a Virtual Environment (Optional)

python -m venv myenv
source myenv/bin/activate

or you can use python3

python3 -m venv myenv

Install Required Packages

pip install python-telegram-bot
pip install psutil

Install urllib3 (optional only if you get an error when try to run)

pip install urllib3

Recommended installing python-telegram-bot v13.7

pip install python-telegram-bot==13.7

Configure

cp config.json_template config.json
  • config.json
    • [TOKEN]: token that we got from BotFather
    • [authorized_users]: list of user that can utilize our bot

Run the Bot

python server.py

Run Bot as a Service

Run your bot as a service using PM2

Install PM2

npm install pm2 -g

Start Bot with PM2

pm2 start server.py --name server_telegram_bot

If the service initialized you can controll it with PM2

pm2 start server_telegram_bot
pm2 stop server_telegram_bot
pm2 restart server_telegram_bot

Save the Process List & Startup

pm2 save
pm2 startup

Support This Project

If you find this project useful and would like to support its development, you can make a donation using Bitcoin. Your contribution will be greatly appreciated.

Bitcoin Address: 1DukhqTeBJLKrhZBKnC4gFFWgTNLt5CU7o

Donating with Bitcoin

To donate with Bitcoin, you can use any Bitcoin wallet of your choice. Here are the steps:

1. Open your Bitcoin wallet.
2. Select the option to send Bitcoin.
3. Enter the amount you wish to donate.
4. In the recipient field, paste the Bitcoin address above (`1DukhqTeBJLKrhZBKnC4gFFWgTNLt5CU7o`).
5. Double-check the address to ensure it's correct.
6. Confirm the transaction.

Your donation will help us continue to improve and maintain this project. Thank you for your support!

About

a Telegram bot that can provide us manage our server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages