Skip to content

Ymil/telegram-bot-manager

Repository files navigation

Telegram bot manager

Objetive

The objective of this project is to create an open source system for the management of telegram bots with the ability to respond to handlers through http apis.

Architecture

Architecture

Screenshots

Captura12312

Home Page

chrome-capture (3)

Bot manager page

chrome-capture (4)

Handler manager

Get start

  1. Install docker engine

    • Configure for use with out sudo.
  2. Clone this repository:

    $: git clone https://github.com/Ymil/telegram-bot-manager.git
    $: cd telegram-bot-manager
  3. Build images

    $: docker-compose -f bot-manager-build.yml build
  4. Run stack

    $: docker-compose -f bot-manager-stack.yml up -d
  5. Configure database

    docker-compose -f bot-manager-stack.yml up -d
    docker exec -it telegram-bot-db psql --user postgres -c "create database botmanager"
    docker exec -it telegram-bot-server bash -c "python manager.py makemigrates; python manager.py migrate";
  6. Create first bot, remplace variables $bot_name and $bot_token

        INSERT INTO public.bots_bot (id, token, name, response_all, description) VALUES (1, "$bot_name", "$bot_token", false, NULL);

    6.1 And copy and insert to

        docker exec -it telegram-bot-db psql --user postgres botmanager

    6.2 After copy developers/insert.sql to postgres shell

  7. Restart task

    docker-compose -f bot-manager-stack.yml down
    docker-compose -f bot-manager-stack.yml up -d
  8. Access to telegram bot manager http://localhost:3000/