mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Allow passing the api_id as string
This commit is contained in:
parent
228b45b179
commit
6e3dbbde5a
@ -192,7 +192,7 @@ class Client(Methods):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: str,
|
name: str,
|
||||||
api_id: int = None,
|
api_id: Union[int, str] = None,
|
||||||
api_hash: str = None,
|
api_hash: str = None,
|
||||||
app_version: str = APP_VERSION,
|
app_version: str = APP_VERSION,
|
||||||
device_model: str = DEVICE_MODEL,
|
device_model: str = DEVICE_MODEL,
|
||||||
@ -219,7 +219,7 @@ class Client(Methods):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.name = name
|
self.name = name
|
||||||
self.api_id = api_id
|
self.api_id = int(api_id) if api_id else None
|
||||||
self.api_hash = api_hash
|
self.api_hash = api_hash
|
||||||
self.app_version = app_version
|
self.app_version = app_version
|
||||||
self.device_model = device_model
|
self.device_model = device_model
|
||||||
|
Loading…
x
Reference in New Issue
Block a user