Skip to content
Telegram System Manager Bot - Safe & Easy run command in your Server/PC/RaspberryPi from every where.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
config
htop-output.html
requirements.txt
tsmb.py

README.md

TSMB

Telegram Server Manager Bot - Safe & Easy run command in your RaspberryPi, PC or server from every where.

How to use:

  1. To begin, you'll need an Access Token. If you already read and followed Introduction to the API, you can use the one you generated then. If not: To generate an Access Token, you have to talk to @BotFather and follow a few simple steps (described here). You should really read the introduction first, though. Source: Your first bot from python-telegram-bot

2 . First install some dependencies:

 sudo pip install python-telegram-bot

Best way is use Virtualenv:

virtualenv -p python3 .env
source .env/bin/activate
pip install python-telegram-bot

Install these package for using htop command:

In debian base:

apt-get install htop aha

In RHEL base:

yum install htop
git clone https://github.com/theZiz/aha.git
cd aha
make
make install
  1. After create your bot and get your Token from botFather, send some text(more than two message) to your bot and use this command to find your chat_id:
curl -X POST https://api.telegram.org/bot[YOUR-TOKEN]/getUpdates

example:

curl -X POST https://api.telegram.org/bot193025875:AAHZ3hIanIau-Hg04B-mZREFBjLl6GvM9fk/getUpdates

Output:

{"ok":true,"result":[{"update_id":124681718,
"message":{"message_id":2888,"from":{"id":131728488,"is_bot":false,"first_name":"Mohammad","last_name":"Parvin","username":"mmparvin","language_code":"en-US"},"chat":{"id":131728488,"first_name":"Mohammad","last_name":"Parvin","username":"mmparvin","type":"private"},"date":1523988641,"text":"HHHHHHHHHHH"}}]}

Put your chat_id and Token(in step1) in config. 3. Make executable tsmb.py file:

chmod +x tsmb.py
  1. Run file:
./tsmb.py

Updates:

  • For more security all response will be sent to the Admin.

Todo:

  • Change admin check structure
  • Add debug section, for getting more report
  • Use error function in all command functions
  • Find best way for detecting interactive commands like htop
  • Add one function for all interactive commands
You can’t perform that action at this time.