dialog with a bot?
can u show, how i can do it?
i mean it's the same as inline, just find the latest message that has a keyboard in it, and you can use usual click stuff on it. idk if there is more direct way to find it. kb = next( msg for msg in client.iter_messages(bot) if isinstance(msg.reply_markup, types.ReplyKeyboardMarkup) )
look how i did current_btn_keyboard = [] btn = await message.get_buttons() if btn != None: current_btn_keyboard.clear() for i in btn: for j in i: current_btn_keyboard.append(j.text) print(current_btn_keyboard) so I always have the current keyboard
a bot can send message 1001 with keyboard buttons, and then send messages 1002 with nothing, 1003 with inline, and 1004 with nothing but the client will still show the keyboard from 1001 is that your problem?
no, I needed to get the current keyboard, and I found how to do it
Lonami thanx for answer
Обсуждают сегодня