Skip to content

Latest commit

 

History

History
51 lines (43 loc) · 1.76 KB

README.md

File metadata and controls

51 lines (43 loc) · 1.76 KB

TSMB

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

How to install and 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: Best way is use Virtualenv:

virtualenv -p python3 .env
source .env/bin/activate
pip install -r requirements.txt

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: use @userinfobot bot to get your chat_id by sending /start to bot. Copy config.example to config and put your chat_id and Token (in step1) in config file.
cp config.example config
  1. Run code:
python bot.py
  1. Send you command: send any command you want like:
ps -aux

Sample of htop output:

To get a snapshot of htop, send /htop command to bot, output will be like this:

htop output