mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-19 04:22:26 +03:00
Updated Retrieving an entity (markdown)
parent
52f1b6e722
commit
d0e76f862b
|
@ -32,11 +32,7 @@ If the user you want to talk to is a contact, you can use [`GetContactsRequest`]
|
|||
from telethon.tl.functions.contacts import GetContactsRequest
|
||||
from telethon.tl.types.contacts import Contacts
|
||||
|
||||
# `.sign_in()´ returns your User, otherwise use:
|
||||
self_user = client.get_me()
|
||||
|
||||
# Even an empty hash for GetContactsRequest seems to work
|
||||
contacts = client(GetContactsRequest(self_user.access_hash))
|
||||
contacts = client(GetContactsRequest(0))
|
||||
if isinstance(contacts, Contacts):
|
||||
users = contacts.users
|
||||
contacts = contacts.contacts
|
||||
|
|
Loading…
Reference in New Issue
Block a user