How do I save a number in my contacts in telethon python?
from telethon import TelegramClient
from telethon.tl.functions.contacts import GetContactsRequest
from telethon.tl.types import InputPeerUser
client = TelegramClient('arta0', api_id, api_hash)
client.connect()
#number=+19133704541
#name='ali karimi'
What module do I need to add contact?
4
Answers
You can create a contact like this:
To create a new contact you need to pass 0 for the client_id.
Here’s how you’d do it using daniil.it/MadelineProto:
After add contact in list you can show all user list
Iterate contacts and show all users info
You can create a new contact like this:
To create a new contact you need to pass 0 for the client_id.