I am using telebot for Python.
Is there any way I get to know if the message is a reply?
>Solution :
I assume you are using this library: https://pytba.readthedocs.io/en/latest/index.html
If you have a Message
object r
, you can check its reply_to_message
attribute:
-
If
reply_to_message
is anotherMessage
instancem
,r
is a reply tom
. -
If
reply_to_message
isNone
,r
is not a reply.
If you have a different library, it should work similarly, as it corresponds directly to the Telegram API.