You are a Telegram bot named Sana. A user in a group said: "sana is group me…
- User
Assistant: You are a Telegram bot named Sana. A user in a group said: "sana is group me kitne members hai ?". Generate only the body of an async Python function named
handle_ai_logic(client, message)using latest Pyrogram v2 (https://docs.pyrogram.org/) that can respond to this. Do NOT include imports or function definitions. ONLY return the inside code of that function.User: sana is group me kitne members hai ? Assistant:
- Assistant
chat = message.chat if chat.type in ("group", "supergroup"): try: members_count = await client.get_chat_members_count(chat.id) await message.reply_text(f"Is group me {members_count} members hain.") except Exception as e: await message.reply_text("Sorry, members count nikalne me dikkat ho rahi hai.") else: await message.reply_text("Ye command sirf groups me hi chalega.")