Skip to content

Installation

v1nc edited this page May 21, 2020 · 4 revisions

Installation:

Use Python 3 to install and run the Bot, Python 2 support could be broken.

  1. Install Pillow prerequisites:
apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
  1. Get the project and install my requirements:
git clone --recurse-submodules https://github.com/v1nc/butter_bot/
pip install -r butter_bot/requirements.txt
  1. Go to project sources and give execution permission to usage scripts:
cd butter_bot/sources
chmod +x run status kill
  1. Copy secrets.example.py to secrets.py and specify Telegram Bot account Token (get it from @BotFather) in secrets.py:
Change 'TOKEN' : 'XXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
  1. Disable privacy mode via @BotFather: select bot-> bot settings -> group privacy -> turn off

  2. Edit OWNER and OWNER_NAME to match your account details!

  3. I need to use telethon if you want to use full log protection. Checking validity of invite links is only possible via telegrams user API. Fill API_ID and API_HASH from my.telegram.org and your API_NAME(display name) into secrets.py. Run generate_session.py one time to generate a session.

Usage:

To ease usage, a run, status and kill scripts has been provided.

  • Launch the Bot:
./run
  • Check if the script is running:
./status
  • Stop the Bot:
./kill
Clone this wiki locally