Search code examples
pythontelegram-botpython-telegram-bot

Get message from chat via message_id?


I know how to get all the IDs from a chat via the received message (update.message.chat.id)

However I couldn't find a function in the docs of Pybot that allows to get a message with a specific ID from the chat (from the past).

Is there such a function available?

EDIT: I found a function that should do what I want but it seems it is not available in Python-Telegram-Bot? https://core.telegram.org/method/messages.getMessages# According to the note, it should be useable by bots as well.


Solution

  • There is a difference between Telegram API and Telegram Bot API.
    Link you provided is about Telegram API, and Bot API doesn't have method like that you want.