LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
10.1k stars 1.41k forks source link

Telegram telethon messages forwarding bot stopped working #4259

Closed dottantgal closed 1 year ago

dottantgal commented 1 year ago

Code that causes the issue

@client.on(events.NewMessage()) async def handler(event): print(event)

Expected behavior

Catch messages and print the event if something is posted on chat, group or channels

Actual behavior

It prints just from chat, group and channel where I am admin, not from channels that I follow

Traceback

No response

Telethon version

1.24.0

Python version

Python 3.8.10

Operating system (including distribution name and version)

Ubuntu 20.04

Other details

starting from yesterday' afternoon my messages forwarding bot stopped to work from grabbing messages from channels, but it seems to work with channels where I am admin. In a few words these code lines (I'm omitting all the previous standard code lines where the client starts) are not catching messages if new messages are posted in channels that I follow. Anyone got the same issue? Do you know if something changed and the channels now can block this kind of events? Thank you

EDIT It works just with one channel where I am admin, I really don't understand the issue.

Checklist

dottantgal commented 1 year ago

Probably I discovered what happened: the massage forwarding is blocked trying to grab messages from channel with more than a certain number of followers. In facts my bot works for channel that I follow with less than 1000 followers, otherwise it doesn't grab anything. This is my theory

kittyandrew commented 1 year ago

My userbot was reposting (receiving and sending as new) messages from 15k people channel (I'm admin) and it just stopped working completely yesterday. Very much fun

dottantgal commented 1 year ago

So it's a common issue right now. What can be the source? Telegram itself blocked it? Basically is not the forwarding, but the catching of messages from medium/big channels that doesn't work anymore

kittyandrew commented 1 year ago

Fixed by upgrading to latest version of telethon! I don't remember why my version was pinned at 1.24.0, but considering we both had the same version, there probably was a good reason at a time. Works fine now for me (so far).

dottantgal commented 1 year ago

Thank you, it works now