D
D
del4pp2021-02-12 16:23:59
Bots
del4pp, 2021-02-12 16:23:59

How to invite a person to a channel using his chat_id in telethon?

Hello.
I'm trying to work with the telegram api, I found the function of inviting to the group chat and to the channel.
You can invite a user to a chat by chat_id, but I did not find such an opportunity to join the channel.
Tell me, is this possible?
If so, where can I find an example (or at least documentation about it).

(you don’t need to send a link to all the documentation, I already read it but didn’t find it)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
ya_ne_znau, 2021-02-13
@ya_ne_znau

from telethon.tl.functions.channels import InviteToChannelRequest
client(InviteToChannelRequest(
         channel=<channel_id>
         users = ['<username>']
))

from here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question