skip to Main Content

I want to remove/hide reply keyboard from a message
I try:

await event.edit(buttons=[])

but it doesn’t work

2

Answers


  1. 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)
    
    Login or Signup to reply.
  2. buttons=None didn’t work for me, buttons=Button.clear(), however, did:

    await event.respond("Text", buttons=Button.clear())
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search