Skip to content

Commit 6e3dbbd

Browse files
committed
Allow passing the api_id as string
1 parent 228b45b commit 6e3dbbd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyrogram/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class Client(Methods):
192192
def __init__(
193193
self,
194194
name: str,
195-
api_id: int = None,
195+
api_id: Union[int, str] = None,
196196
api_hash: str = None,
197197
app_version: str = APP_VERSION,
198198
device_model: str = DEVICE_MODEL,
@@ -219,7 +219,7 @@ def __init__(
219219
super().__init__()
220220

221221
self.name = name
222-
self.api_id = api_id
222+
self.api_id = int(api_id) if api_id else None
223223
self.api_hash = api_hash
224224
self.app_version = app_version
225225
self.device_model = device_model

0 commit comments

Comments
 (0)