Z
Z
zerofilling2018-08-04 02:01:03
Python
zerofilling, 2018-08-04 02:01:03

How to save message id or link to it in Telegram bot?

I am making a bot. It is required that the user send me a message, and the bot saves a link to this message in a dictionary, and the dictionary in a file (the bot groups messages into "virtual folders" to make it easier to navigate among these saved messages). Generally speaking, it is required that when a user sends a message to the bot, a link to this message and / or its id can be saved somewhere and then displayed. Or is there some other way to save a link to a post? I can explain any details. Please tell me how can this be done? I am using BotTelegramApi for Python.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly, 2018-08-04
@trofimovdev

For example, you can save who received the message and its id.
There are no direct links/message IDs, as far as I know.

A
Alexander Proshchenkov, 2018-08-04
@Keltor

Here in this video at 38:55 you can see the json that teltgram sends
https://www.youtube.com/watch?v=Al7hkU6RO9M&t=2993s
You can access the message_id: message.message_id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question