N
N
NotesOfCrook2021-11-25 12:05:50
Python
NotesOfCrook, 2021-11-25 12:05:50

How to make a telegram post aggregator using Telethon (Python)?

The idea is to make a news aggregator using Teleton in a telegram, so that from one channel (or several) everything is sent to my channel. The goal is to speed up the search for information because you do not need to go to all channels separately.

Tried to understand Telethon's documentation, but didn't understand how to interact with groups. Maybe someone has similar code, advice or suggestions about using a different library.

I will be very grateful for the help, maybe even throw it for coffee if you help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-11-25
@SoreMix

Hang a decorator
@client.on(events.NewMessage(chats=[]))
In the chats parameter, pass a list of chat ids.
Inside the handler, forward the message
await event.message.forward_to(entity)
https://docs.telethon.dev/en/latest/modules/events.html
https://docs.telethon.dev/en/latest/modules/custom...
https://docs.telethon .dev/en/latest/modules/client...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question