Search code examples
pythontelegramtelegram-bottelethon

Telegram has empty message if channel is Restrict Saving Content in telethon


I have a simple python script to read a message from Telegram-Channle.

when the Channel with option Restrict Saving Content is enabled, then the message is empty.

I use Telethon==1.23.0

from telethon import TelegramClient, events

api_id = ******
api_hash = '2f06ea4*****'
phone = '+#######'
client: TelegramClient = TelegramClient('Client', api_id, api_hash)


@client.on(events.NewMessage(chats:'chats='https://t.me/*****'))
async def my_event_handler(event):
        print(event.raw_text)


client.start()
client.run_until_disconnected()

Solution

  • It seems to be an open issue.. https://github.com/LonamiWebs/Telethon/issues/3264