From 872c58a9eb011204df9232ad6f7e770066481efb Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 30 Aug 2024 00:31:04 +0330 Subject: [PATCH] Added cache time & Fix title --- core/scripts/telegrambot/tbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/scripts/telegrambot/tbot.py b/core/scripts/telegrambot/tbot.py index bd65d1d..8bf29e9 100644 --- a/core/scripts/telegrambot/tbot.py +++ b/core/scripts/telegrambot/tbot.py @@ -312,7 +312,7 @@ def handle_inline_query(query): results = [] for username, details in users.items(): if query_text in username.lower(): - title = f"Username: {username}" + title = f"{username}" description = f"Traffic Limit: {details['max_download_bytes'] / (1024 ** 3):.2f} GB, Expiration Days: {details['expiration_days']}" results.append(types.InlineQueryResultArticle( id=username, @@ -327,7 +327,7 @@ def handle_inline_query(query): ) )) - bot.answer_inline_query(query.id, results) + bot.answer_inline_query(query.id, results, cache_time=0) if __name__ == '__main__': bot.polling(none_stop=True)