admin 2af4603ba3 Implement profile change detection and persistence
- Enhance topic detection with message_thread_id (primary) and reply_to_topic_id (fallback)
- Add DatabaseManager.get_user_profile() to load stored user profiles
- Add DatabaseManager.update_user_profile() for profile-only updates (without affecting message_count)
- Refactor handle_profile_update() to compare stored vs current profiles
- Automatically detect name and username changes in handle_message()
- Persist detected profile changes to user_stats and profile_history tables
- Log profile changes with before/after details in activity logging
2026-06-09 20:32:35 +02:00

LoggingBot

Kurze Anleitung zum Einrichten und Starten des Bots.

Voraussetzungen:

  • Python 3.8+
  • git (optional)

Schnellstart

1. Virtuelle Umgebung anlegen und aktivieren

python3 -m venv .venv
source .venv/bin/activate

2. Abhängigkeiten installieren

pip install --upgrade pip
pip install -r requirements.txt

3. Konfiguration erstellen

Kopiere config_example.yaml zu config.yaml und passe die Werte an:

cp config_example.yaml config.yaml

Öffne config.yaml und ersetze:

  • YOUR_BOT_TOKEN_HERE mit deinem echten Telegram Bot Token
  • Optional: Passe debug_mode, database.name und andere Einstellungen an

4. Bot starten

python bot.py

Konfiguration

Die Konfiguration erfolgt über die Datei config.yaml:

  • bot.token: Dein Telegram Bot Token (von BotFather)
  • bot.debug_mode: Debug-Ausgaben aktivieren (true/false)
  • database.name: SQLite-Datenbankdatei
  • logging.write_to_file: Aktiviere Datei-Logging (true/false)
  • logging.file_name: Name der Protokolldatei
  • logging.level: Python Logging Level (DEBUG, INFO, WARNING, ERROR, CRITICAL)

Optional: Ein kurzes Setup-Skript ist enthalten: setup_venv.sh.

S
Description
No description provided
Readme 64 KiB
Languages
Python 98.4%
Shell 1.6%