diff options
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -27,6 +27,7 @@ from aiogram.types import ( Message, ) from callbacks import * +from statistics import * from colors import * from commands import * from dotenv import load_dotenv @@ -170,6 +171,7 @@ async def guest_middleware(handler, event, data): user_id=user_id, message_id=None, ) + add_one_to("stats/guest") try: await data["bot"]( AnswerGuestQuery( @@ -434,6 +436,8 @@ async def chosen_inline_result_handler(chosen_result: ChosenInlineResult): inline_message_id = chosen_result.inline_message_id user_id = chosen_result.from_user.id + add_one_to("stats/inline") + if chosen_result.query == "clear": user_contexts[user_id] = [] else: @@ -485,6 +489,11 @@ async def chosen_inline_result_handler(chosen_result: ChosenInlineResult): async def main(): + ensure_path("stats/gens") + ensure_path("stats/inline") + ensure_path("stats/guest") + ensure_path("stats/ben") + ensure_path("stats/reporn") await bot.delete_webhook(drop_pending_updates=True) await dp.start_polling( bot, |