diff --git a/Joining-a-chat-or-channel.md b/Joining-a-chat-or-channel.md index 41e6845..cff8f07 100644 --- a/Joining-a-chat-or-channel.md +++ b/Joining-a-chat-or-channel.md @@ -6,11 +6,11 @@ Once you have the [entity](Retrieving-an-entity) of the channel you want to join ```python from telethon.tl.functions.channels import JoinChannelRequest -client.invoke(JoinChannelRequest(channel)) +client(JoinChannelRequest(channel)) # In the same way, you can also leave such channel from telethon.tl.functions.channels import LeaveChannelRequest -client.invoke(LeaveChannelRequest(input_channel)) +client(LeaveChannelRequest(input_channel)) ``` For more on channels, check the [`channels` namespace](https://lonamiwebs.github.io/Telethon/methods/channels/index.html). @@ -21,7 +21,7 @@ If all you have is a link like this one: `https://t.me/joinchat/AAAAAFFszQPyPEZ7 ```python from telethon.tl.functions.messages import ImportChatInviteRequest -updates = client.invoke(ImportChatInviteRequest('AAAAAEHbEkejzxUjAUCfYg')) +updates = client(ImportChatInviteRequest('AAAAAEHbEkejzxUjAUCfYg')) ``` ## Adding someone else to such chat or channel @@ -31,7 +31,7 @@ If you don't want to add yourself, maybe because you're already in, you can alwa ```python from telethon.tl.functions.messages import AddChatUserRequest -client.invoke(AddChatUserRequest( +client(AddChatUserRequest( chat_id, user_to_add, fwd_limit=10 # allow the user to see the 10 last messages