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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue