D
D
DontQuantum2021-06-18 16:31:55
Python
DontQuantum, 2021-06-18 16:31:55

Telethon how to determine if it is a channel or a group and can I write in it?

When receiving a list of all dialogs, Telethon divides them into three types channel, chat, user how can I determine what kind of dialogue a channel or group is and how to determine if I can write in them, for example, if I am banned in a group

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
agent_2203, 2021-06-20
@agent_2203

from telethon.tl.functions.channels import JoinChannelRequest

client(CheckChatInviteRequest(hash)).chat # приватная ссылка
client.get_entity(name) # публичная

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question