mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 21:38:04 +00:00
Merge branch 'master' into dispatcher
This commit is contained in:
commit
66d03848de
@ -135,7 +135,7 @@ class Client:
|
|||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
session_name: str,
|
session_name: str,
|
||||||
api_id: int = None,
|
api_id: int or str = None,
|
||||||
api_hash: str = None,
|
api_hash: str = None,
|
||||||
proxy: dict or Proxy = None,
|
proxy: dict or Proxy = None,
|
||||||
test_mode: bool = False,
|
test_mode: bool = False,
|
||||||
@ -147,7 +147,7 @@ class Client:
|
|||||||
last_name: str = None,
|
last_name: str = None,
|
||||||
workers: int = 4):
|
workers: int = 4):
|
||||||
self.session_name = session_name
|
self.session_name = session_name
|
||||||
self.api_id = api_id
|
self.api_id = int(api_id)
|
||||||
self.api_hash = api_hash
|
self.api_hash = api_hash
|
||||||
self.proxy = proxy
|
self.proxy = proxy
|
||||||
self.test_mode = test_mode
|
self.test_mode = test_mode
|
||||||
@ -381,7 +381,7 @@ class Client:
|
|||||||
self.phone_code = (
|
self.phone_code = (
|
||||||
input("Enter phone code: ") if self.phone_code is None
|
input("Enter phone code: ") if self.phone_code is None
|
||||||
else self.phone_code if type(self.phone_code) is str
|
else self.phone_code if type(self.phone_code) is str
|
||||||
else self.phone_code()
|
else str(self.phone_code())
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user