mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Add InputPhoneContact type
This commit is contained in:
parent
7d72738153
commit
2ab8fbe047
2 changed files with 12 additions and 0 deletions
|
|
@ -30,4 +30,5 @@ from .client import ChatAction
|
|||
from .client import Client
|
||||
from .client import ParseMode
|
||||
from .client.input_media import InputMedia
|
||||
from .client.input_phone_contact import InputPhoneContact
|
||||
from .client import Emoji
|
||||
|
|
|
|||
11
pyrogram/client/input_phone_contact.py
Normal file
11
pyrogram/client/input_phone_contact.py
Normal 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
|
||||
)
|
||||
Loading…
Reference in a new issue