add /support
This commit is contained in:
parent
d52e962022
commit
5c69859868
2 changed files with 17 additions and 0 deletions
|
|
@ -681,6 +681,13 @@ class LichessBot:
|
|||
"""Week command"""
|
||||
await self.get_stats(update, context, "week")
|
||||
|
||||
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)
|
||||
await update.message.reply_text(support_msg, parse_mode='HTML')
|
||||
self.counters.increment('support')
|
||||
|
||||
async def last_year_or_1000games(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||
"""Get last year stats or last 1000 rated games, whichever limits first"""
|
||||
user_id = update.effective_user.id
|
||||
|
|
@ -984,6 +991,7 @@ class LichessBot:
|
|||
application.add_handler(CommandHandler("yesterday", self.yesterday))
|
||||
application.add_handler(CommandHandler("week", self.week))
|
||||
application.add_handler(CommandHandler("lastYear_or_1000games", self.last_year_or_1000games))
|
||||
application.add_handler(CommandHandler("support", self.support))
|
||||
application.add_handler(CommandHandler("setperiod", self.setperiod))
|
||||
application.add_handler(CommandHandler("lang", self.check_language))
|
||||
application.add_handler(CommandHandler("resetlang", self.reset_language))
|
||||
|
|
|
|||
|
|
@ -92,6 +92,15 @@ TRANSLATIONS = {
|
|||
'period_games_section': "{emoji} {game_type} — {games_count} games • {rating_change}\nRating: {rating}\n✅ Wins: {wins}\n❌ Losses: {losses}\n🤝 Draws: {draws}\n\n",
|
||||
'no_activity': "📭 No activity for this period",
|
||||
|
||||
# Support
|
||||
'support_message': (
|
||||
"💬 <b>Support & Feedback</b>\n\n"
|
||||
"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 <b>English</b> and <b>Russian</b> languages.\n\n"
|
||||
"📧 Contact: <a href=\"https://t.me/vrubelr\">@vrubelr</a>"
|
||||
),
|
||||
|
||||
# Common
|
||||
'period_minutes_suffix': "m",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue