Refactor VNDB Telegram Bot

- Remove config.py and integrate environment variable handling directly in docker-compose.yml.
- Delete detailed_handlers.py and replace with simplified command handlers.
- Update requirements.txt to use aiogram and httpx instead of python-telegram-bot and requests.
- Remove test_bot.py and utils.py, consolidating functionality into new VNDBClient class.
- Implement VNDBClient for API interactions, simplifying query methods for visual novels, characters, and releases.
- Clean up docker-compose.yml for improved readability and maintainability.
This commit is contained in:
2026-05-01 18:04:13 +03:00
parent fd0a403f37
commit 88bba02983
19 changed files with 142 additions and 6647 deletions

View File

@@ -1,20 +1,10 @@
FROM python:3.11-slim
FROM python:3.12-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Copy environment file (or use docker secrets/environment variables)
# COPY .env .
# Create non-root user for security
RUN useradd -m -u 1000 botuser && chown -R botuser:botuser /app
USER botuser
# Run the bot
CMD ["python", "bot.py"]
CMD ["python", "bot.py"]