Telethon: Certain group chat messages are not returned

Viewed 296

I am trying to stream live telegram messages using telethon. The below code works perfectly for some chats (i.e. FEGchatIR), however, for the chat FEGchat (and very likely others), there is no output even when the chat is clearly active. Does anyone have any idea why this is?

from telethon import TelegramClient, events, sync
from keys import api_id, api_hash


client = TelegramClient('anon', api_id, api_hash)

@client.on(events.NewMessage(chats=['FEGchat']))
async def my_event_handler(event):
    print(event.raw_text)
    
await client.start()
await client.run_until_disconnected()

Also, does anyone know the limit on the number of chats you can collect data with using this method? Telegram seem fairly vague on rate limits...

Thanks!

1 Answers
Related