I want to remove/hide reply keyboard from a message I try:
await event.edit(buttons=[])
but it doesn’t work
2
You can not edit events, because at normally they are incoming not outgoing.
for remove reply_markup/reply_keyboard you should send a message and put buttons value empty :
await client.send_message(event.chat_id,'Some Text',buttons=None)
but if you have the message id of previous message you sent you can edit that message buttons:
await client.edit_message(chat_id,message_id,'New Text',buttons=None)
buttons=None didn’t work for me, buttons=Button.clear(), however, did:
buttons=None
buttons=Button.clear()
await event.respond("Text", buttons=Button.clear())
Click here to cancel reply.
2
Answers
You can not edit events, because at normally they are incoming not outgoing.
for remove reply_markup/reply_keyboard you should send a message and put buttons value empty :
but if you have the message id of previous message you sent you can edit that message buttons:
buttons=None
didn’t work for me,buttons=Button.clear()
, however, did: