summaryrefslogtreecommitdiff
path: root/telegram_bot/commands.py
diff options
context:
space:
mode:
authorDmitrii Morozov <snoopdesigns@gmail.com>2025-01-05 22:33:28 +0100
committerDmitrii Morozov <snoopdesigns@gmail.com>2025-01-05 22:33:28 +0100
commit694eadd7f06f65b925d2c06a3492bd7d9153d016 (patch)
tree2c9d993c5882218c980b3af6e091b2d5dbf9c597 /telegram_bot/commands.py
parent71c11730713f7d5ebe07175d5701cbe8434bb5da (diff)
Add query to accept or decline new friends
Diffstat (limited to 'telegram_bot/commands.py')
-rw-r--r--telegram_bot/commands.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/telegram_bot/commands.py b/telegram_bot/commands.py
index 697d1e3..9c12d97 100644
--- a/telegram_bot/commands.py
+++ b/telegram_bot/commands.py
@@ -80,7 +80,8 @@ class GetStatsCallbackQueryHandler(CallbackQueryHandler):
await self.reply_with_stats_days_difference(call.message, __duration_week__)
elif call.data == __stats_month__:
await self.reply_with_stats_days_difference(call.message, __duration_month__)
- await self.__telegram_bot.answer_callback_query(callback_query_id=call.id)
+
+ await self.__telegram_bot.answer_callback_query(callback_query_id=call.id)
async def reply_with_today_stats(self, message):
friends = await self.__fortnite_client.get_friends()
@@ -117,7 +118,7 @@ class GetStatsCommand(CommandHandler):
self.__telegram_bot.register_callback_query(
GetStatsCallbackQueryHandler(self.__telegram_bot, self.__fortnite_client, self.__stats_repository),
- lambda call: True)
+ lambda call: call.data == __stats_now__ or call.data == __stats_day__ or call.data == __stats_week__ or call.data == __stats_month__)
async def handle(self, message: telebot.types.Message):
await self.__telegram_bot.reply(message, 'Which statistics would you like to see?', reply_markup=self.__reply_markup)