I have a problem getting the comments to message of a telegram channel with the telethon python library.
I created a blank channel, added the discussbot to get the comment button under the messages, post a message and add comments to the message.
When I use the telethon library, I get the original messages of the channel but the replies attribute is None and I can’t get the comments. Also I don’t get the replies in the loop.
Any idea, why the replies attribut is None? how can I receive the comments?
with TelegramClient("anon", api_id, api_hash) as client:
channel_entity=client.get_entity("testchannel")
for message in client.iter_messages(
channel_entity, offset_date=till_date
):
Thanks
Marv
1
Thanks for your answer. I tried the following code:
channel_entity=client.get_entity("testchannel")
full_channel = client(functions.channels.GetFullChannelRequest(
channel=channel_entity
))
full_chat = full_channel.full_chat
for message in client.iter_messages(
channel_entity, offset_date=till_date
):
I get the full_chat object but the linked_chat_id attribute is None (see debugging screenshot, I cleared the id attribute in the picture).
I added a screenshot from the telegram comments.app website with a test message in the channel and some test comments.
Any idea why the linked_chat_id is empty?
1