From b958bddcfb5cec9ff076522803e90181a96af7d0 Mon Sep 17 00:00:00 2001 From: huker667 Date: Thu, 16 Jul 2026 12:42:36 +0300 Subject: add more errors parsing and fix some errors da --- helpers.py | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'helpers.py') diff --git a/helpers.py b/helpers.py index 6f4a3bc..f7525ea 100644 --- a/helpers.py +++ b/helpers.py @@ -76,7 +76,6 @@ def is_replied_bot(message, is_channel, user_text, config=None): return True async def g_answer( - data, message, text, title="da", @@ -95,15 +94,12 @@ async def g_answer( input_message_content=InputRichMessageContent( rich_message=InputRichMessage(markdown=text) ) - return await data["bot"]( - AnswerGuestQuery( - guest_query_id=message.guest_query_id, - result=InlineQueryResultArticle( - id=id, - reply_markup=reply_markup, - title=title, - input_message_content=input_message_content - ) + return await message.answer_guest_query( + result=InlineQueryResultArticle( + id=id, + reply_markup=reply_markup, + title=title, + input_message_content=input_message_content ) ) @@ -148,3 +144,21 @@ def send_to_vosk(audio): ) return r.json() + + +async def mans(message, text): + if message.guest_query_id: + return await message.answer_guest_query( + result=InlineQueryResultArticle( + id=1, + reply_markup=None, + title="da", + input_message_content=InputTextMessageContent( + message_text=text, + parse_mode="Markdown" + ) + ) + ) + else: + return await message.reply_text(text) + -- cgit v1.3.1