Giter Site home page Giter Site logo

masterbot's Introduction

MasterBot

Control bots on your server. Easiest way to manage multiple bots. Works for any .py scripts/bots, not just telegram bots

Functions:

  1. Pull the latest commit and restart the bot
  2. Gets current statistics of the server
  3. Notifies admins when a bot is either killed/stopped

How to deploy?

  1. Clone the repo git clone https://github.com/GauthamramRavichandran/MasterBot

  2. Change directory

    cd MasterBot

  3. Create a new virtual environment

    virtualenv env

  4. Activate the virtual environment by,

    source env/bin/activate

  5. Install the requirements,

    pip3 install -r requirements.txt

  6. Fill in the /const/CONFIG.py file

  7. Place the cert.pem file if bot wants to use webhook method

  8. Start the master bot, python main.py

Assumptions

  1. All the bots should have a separate virtualenv (called env) within its folder
  2. The last argument should be the alias (only alias will be used, not the name of the .py file)

⚠️ Known Issue

Once the masterbot restarts anyother program, the new program will be under the masterbot process tree. If masterbot killed for any reason, all the programs started via this bot will be terminated too.

One way to safe kill this bot is to send SIGTERM signal, which will terminate this bot while preserving its children to continue execution.

How to send SIGTERM signal?

  1. Open htop
  2. Locate this bot by searching (F3 key)
  3. F9 to kill > select SIGTERM

DISCLAIMER

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. YOU MAY USE THIS SOFTWARE AT YOUR OWN RISK. THE USE IS COMPLETE RESPONSIBILITY OF THE END-USER. THE DEVELOPERS ASSUME NO LIABILITY AND ARE NOT RESPONSIBLE FOR ANY MISUSE OR DAMAGE CAUSED BY THIS PROGRAM.

Please feel free to raise an issue here if you have any queries

masterbot's People

Contributors

gauthamramravichandran avatar alenpaulvarghese avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.