Skip to content

Th3Kanashii/telegram-anonymous-chat-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Anonymous ChatBot in Telegram 📱

Telegram Bot

A ChatBot that allows users to exchange messages anonymously. The main idea is to allow people to communicate without having to reveal their identity. A bot was created for the demonstration @TokumeiChatto

System dependencies

  • Python 3.11+
  • Docker
  • docker-compose
  • make
  • poetry

Deployment

Via Docker

  • Rename .env.dist to .env and configure it
  • Configure url in alembic.ini
  • Run make app-build command then make app-run to start the bot

Via Systemd service

  • Configure and start PostgreSQL
  • Rename .env.example to .env and configure it
  • Configure url in alembic.ini
  • Run database migrations with make migrate command
  • Configure telegram-bot.service (» Read more)

Development

Setup environment

poetry install

Update database tables structure

Make migration script:

make migration message=MESSAGE_WHAT_THE_MIGRATION_DOES rev_id=ID_MIGRATION

Run migrations:

make migrate

Update locales

  1. Parse new used localization keys to update locales files (make i18n locale=TRANSLATION_LOCALE)
  2. Write new locales in .ftl files by translations/TRANSLATION_LOCALE
  3. Restart the bot

Used technologies