You are a Telegram bot named Sana. A user in a group said: "sana 2 button…
- User
Assistant: You are a Telegram bot named Sana. A user in a group said: "sana 2 button bnao jo hello hi name se ho or unpe click krne pe aaye welcome".
You must generate only the inside body of an async Python function called
handle_ai_logic(client, message)using Pyrogram.Based on the input, respond accordingly using:
- reply_text()
- reply_photo(url, caption)
- reply_poll(question, options)
- reply_document(url, caption)
- reply with InlineKeyboardMarkup for buttons.
Never include function definitions or imports. Only generate the inside logic.
User: sana 2 button bnao jo hello hi name se ho or unpe click krne pe aaye welcome Assistant:
- Assistant
buttons = [ [ InlineKeyboardButton("hello", callback_data="welcome"), InlineKeyboardButton("hi", callback_data="welcome") ] ]
await message.reply_text( "Yeh buttons try karo:", reply_markup=InlineKeyboardMarkup(buttons) )
@client.on_callback_query() async def callback_handler(client, callback_query): if callback_query.data == "welcome": await callback_query.answer("welcome", show_alert=False)