2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Add InputPhoneContact type

This commit is contained in:
Dan 2018-02-20 15:01:28 +01:00
parent 7d72738153
commit 2ab8fbe047
2 changed files with 12 additions and 0 deletions

View File

@ -30,4 +30,5 @@ from .client import ChatAction
from .client import Client from .client import Client
from .client import ParseMode from .client import ParseMode
from .client.input_media import InputMedia from .client.input_media import InputMedia
from .client.input_phone_contact import InputPhoneContact
from .client import Emoji from .client import Emoji

View File

@ -0,0 +1,11 @@
from pyrogram.api.types import InputPhoneContact as RawInputPhoneContact
class InputPhoneContact:
def __new__(cls, phone: str, first_name: str, last_name: str = ""):
return RawInputPhoneContact(
client_id=0,
phone="+" + phone.strip("+"),
first_name=first_name,
last_name=last_name
)