Q
Q
quantum320432021-11-06 23:07:24
Python
quantum32043, 2021-11-06 23:07:24

How can I copy messages from a telegram channel through a bot?

It took to write a bot that would periodically copy the last message from the telegram channel (the channel is not mine!) And paste it on the site. But I could not find how the bot can take this message from the channel. Are there any options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antares4045, 2021-11-07
@antares4045

bots don't have methods to access any information about channels, they have hooks: that is, all they can get must answer the following question: "the following events have occurred since you were last interested in you."
If your bot basically sees messages, then it can remember the last one, and when you need it, happily report it. But in the general case, Telegram almost deliberately built the api of bots so that your task was not solvable if the channel owner was not interested in helping you.
Rather, you should look towards full telegram clients running on behalf of full users, such as Pyrogram .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question