Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get telegram's channel description in Telethon?

Tags:

I'm writing a client of telegram using Telethon. How can i get channel description? get_entity method does not provide channel description.

like image 245
Cierra Clark Avatar asked Jan 24 '18 21:01

Cierra Clark


1 Answers

There is GetFullChannelRequest method

from telethon.tl.functions.channels import GetFullChannelRequest
# creating client here
ch = client.get_entity("@mychannel")
ch_full = client(GetFullChannelRequest(channel=ch))
ch_full.full_chat.about # this is what you need

So you may want to inspect full_chat attribute as it includes rest of info

like image 153
Kreees Avatar answered Sep 19 '22 13:09

Kreees