skip to Main Content

I want to respond to a message in a Telegram channel, using the message id, from the message to respond to, with python.

Example:

await client.msg_respond(entity=entity, msg_id=msg_id, msg="Hello") 

Is there something like that?

2

Answers


  1. Chosen as BEST ANSWER

    It works like this:

    await client.send_message(entity=entity,message="reply msg", reply_to=msgID)
    

  2. This is usual example show you how to do this:

    @client.on(events.NewMessage(chats=-1001672571848))
    async def my_event_handler(event):
        msg = event.message
    
        await client.send_message(entity=-1001672571848,
                    reply_to=msg.id, message=text
                )
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search