Skip to content
Snippets Groups Projects
Pavel Kirilin's avatar
83f0f8f7
History

This bot listens for all incoming messages and replying from your account.

You can define patterns to react on, such as incoming messages that match some patterns, new members in groups and much more!

Why do I ever need this?

I don't need it. But sometimes this can become handy. Some functions I use like every day. Especially ".pip" ".aur" and ".bl".

How can i setup this for my account?

This is pretty simple. You can run it locally or setup a deployment on your server.

Local configuration

To run this locally just clone the repo, go to the cloned folder, rename .env.example to .env, fill it and then just run:

pip install -r requirements/requirements.base.txt
export $(cat .env)
python main.py

Then go to telegram copy the verification token and submit it on localhost:8080

That's all.

Server configuration

Clone this repo to your gitlab.

  • Change container_name in docker-compose.yml and docker-compose.test.yml.
  • Change name of file bot_s3rius_san.service in systemd folder.
  • Update CI variables in Gitlab.
    • APP_DIR
    • TELEGRAM_API_HASH
    • TELEGRM_APP_ID_MASKED (This is your TELEGRM_APP_ID with 'a' at the beginning)
    • TELEGRAM_ACCOUNT_PHONE
    • LIBRARIES_IO_API_TOKEN
  • Don't forget to declare a global network on your server like memes_network in docker-compose.yml.
  • Add access to your container from the network for token submission.