From d23f026b194a778feb5a8888bdd579333d094016 Mon Sep 17 00:00:00 2001 From: vrubelroman Date: Sun, 16 Nov 2025 21:36:48 +0300 Subject: [PATCH] add versions --- LichessClientTG_bot/bot.py | 4 ++-- LichessClientTG_bot/config.py | 3 +++ LichessClientTG_bot/i18n.py | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/LichessClientTG_bot/bot.py b/LichessClientTG_bot/bot.py index 6a45c6e..b27611f 100644 --- a/LichessClientTG_bot/bot.py +++ b/LichessClientTG_bot/bot.py @@ -13,7 +13,7 @@ from telegram.ext import ( from config import ( TELEGRAM_BOT_TOKEN, PERIOD_OPTIONS, POLL_INTERVAL, POLL_TIMEOUT, DROP_PENDING_UPDATES, ALLOWED_UPDATES, - LICHESS_STATS_API_BASE_URL, ADMINPANEL_TELEGRAM_BOT_TOKEN + LICHESS_STATS_API_BASE_URL, ADMINPANEL_TELEGRAM_BOT_TOKEN, BOT_VERSION ) from database import Database from lichess_api import LichessAPI @@ -702,7 +702,7 @@ class LichessBot: async def support(self, update: Update, context: ContextTypes.DEFAULT_TYPE): """Support command - show contact information""" lang = self.get_user_language_from_update(update) - support_msg = t('support_message', lang) + support_msg = t('support_message', lang, version=BOT_VERSION) await update.message.reply_text(support_msg, parse_mode='HTML') self.counters.increment('support') diff --git a/LichessClientTG_bot/config.py b/LichessClientTG_bot/config.py index 7e811fa..7b2f10a 100644 --- a/LichessClientTG_bot/config.py +++ b/LichessClientTG_bot/config.py @@ -33,6 +33,9 @@ DATABASE_PATH = _resolve_database_path() # Period options for /setperiod command PERIOD_OPTIONS = [0, 15, 30, 60, 120, 180, 360, 720, 1440] # minutes (0=disable, then: 15min, 30min, 1h, 2h, 3h, 6h, 12h, 24h) +# Bot Version +BOT_VERSION = "1.0.0" + # Telegram Bot Long Polling Configuration POLL_INTERVAL = 1.0 # seconds POLL_TIMEOUT = 30 # seconds diff --git a/LichessClientTG_bot/i18n.py b/LichessClientTG_bot/i18n.py index 5c2e904..c59324e 100644 --- a/LichessClientTG_bot/i18n.py +++ b/LichessClientTG_bot/i18n.py @@ -100,7 +100,8 @@ TRANSLATIONS = { "You can write to the service developer directly and report a problem, suggest new features, or ask a question.\n\n" "I will be happy to review every message and respond to it.\n\n" "The developer accepts messages in English and Russian languages.\n\n" - "📧 Contact: @vrubelr" + "📧 Contact: @vrubelr\n\n" + "📦 Bot version: {version}" ), # Common