Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Возможность задать device_name и версию telegram #82

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/tg_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
api_hash = data['api_hash']
cexio_ref_code = data['cexio_ref_code']
blum_ref_code = data['blum_ref_code']
device_name = data['device_name']
tg_version = data['tg_version']

def getUrl(client: TelegramClient, peer: str, bot: str, url: str, platform: str = "ios", start_param: str = ""):
return client(
Expand Down Expand Up @@ -111,8 +113,9 @@ def create_client(api_id, api_hash, admin, cexio_ref_code):
f'sessions/{session_name}',
api_id,
api_hash,
device_model=f"All-In-One(MA)"
device_model=device_name
)
client.__version__ = tg_version

print("[INFO] Starting Telegram client...")
client.start()
Expand Down