summaryrefslogtreecommitdiff
path: root/telegram_bot/commands.py
diff options
context:
space:
mode:
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)