BotListBot Save

Repository of Telegram's BotListBot

Project README

The Telegram @BotListBot

This is the Chatbot in charge of maintaining the Telegram BotList, a channel that is a community-driven approach to collect the best Bots on Telegram.

The bot simplifies navigation by acting as a mirror of the BotList, and automates the process of submitting, reviewing and publishing bots by the BotListChat community.

This repository is meant as inspiration and technical guidance for bot builders, mainly for folks using the amazing python-telegram-bot library.

JosXa/BotListBot is licensed under the MIT License.

Setup Guide

Prerequesites

Mandatory

  • Python 3.7.x
  • A PostgreSQL database instance or Docker (see below)
  • Pipenv installed globally (pip install pipenv)
  • Your own bot token for local development

Optional

  • A sentry.io account (logging)
  • An S3-compatible object storage (e.g. Minio)

Development Setup

Using GitHub codespaces and VSCode (recommended)

Recommended because it is the fastest option to get you started.

  1. On GitHub Codespaces, enter "JosXa/BotListBot" and create your dev container.
  2. Modify the variables in template.env and save the file as just .env in the root folder of the checkout.
  3. Run the project via pipenv run python -m botlistbot.main
Using PyCharm...
Set up a PostgreSQL database instance with Docker
  1. Install Docker
  2. Run docker-compose up -d
  3. Create and seed the database via pipenv run python scripts/initialize_database.py seed
  4. To stop the database, run docker-compose down
Set up BotListBot
  1. VCS -> Get from Version Control... -> https://github.com/JosXa/BotListBot (or your own fork)
  2. Add a new project Interpreter using Pipenv (not virtualenv) and let PyCharm install the packages for you
  3. Modify the variables in template.env and save the file as just .env in the root folder
  4. Run the file scripts/initialize_database.py once. Then open its run configuration, add the word "seed" to the arguments list, and run it again. This will fill the database with some initial, required values.
  5. Run botlistbot/main.py using a default configuration
Not using PyCharm...
Set up a PostgreSQL database instance with Docker
  1. Install Docker
  2. Run docker-compose up -d
  3. Create and seed the database via pipenv run python scripts/initialize_database.py seed
  4. To stop the database, run docker-compose down
Set up BotListBot
  1. Clone from GitHub: git clone https://github.com/JosXa/BotListBot (or your own fork)
  2. Run pipenv install
  3. Modify the variables in template.env and save the file as just .env in the root folder of the checkout.
  4. Create and seed the database via pipenv run python scripts/initialize_database.py seed
  5. Run the project via pipenv run python -m botlistbot.main

Further details on configuration

If you have a look at settings.py, you can see a bunch of environment variables that are being retrieved via decouple.config(...) calls. Those settings can be controlled via the .env file you created at the root folder.

Open Source Agenda is not affiliated with "BotListBot" Project. README Source: JosXa/BotListBot
Stars
57
Open Issues
2
Last Commit
1 year ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating