Skip to content

Commit

Permalink
Add lang_pack to Client params
Browse files Browse the repository at this point in the history
  • Loading branch information
eyMarv committed Jan 6, 2024
1 parent afe6319 commit 5fa3e03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pyrogram/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ class Client(Methods):
Code of the language used on the client, in ISO 639-1 standard.
Defaults to "en".
lang_pack (``str``, *optional*):
Internal parameter.
Defaults to "".
ipv6 (``bool``, *optional*):
Pass True to connect to Telegram using IPv6.
Defaults to False (IPv4).
Expand Down Expand Up @@ -203,6 +207,7 @@ class Client(Methods):
SYSTEM_VERSION = f"{platform.system()} {platform.release()}"

LANG_CODE = "en"
LANG_PACK = ""

PARENT_DIR = Path(sys.argv[0]).parent

Expand All @@ -227,6 +232,7 @@ def __init__(
device_model: str = DEVICE_MODEL,
system_version: str = SYSTEM_VERSION,
lang_code: str = LANG_CODE,
lang_pack: str = LANG_PACK,
ipv6: bool = False,
alt_port: bool = False,
proxy: dict = None,
Expand Down Expand Up @@ -258,6 +264,7 @@ def __init__(
self.device_model = device_model
self.system_version = system_version
self.lang_code = lang_code.lower()
self.lang_pack = lang_pack.lower()
self.ipv6 = ipv6
self.alt_port = alt_port
self.proxy = proxy
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async def start(self):
system_version=self.client.system_version,
system_lang_code=self.client.lang_code,
lang_code=self.client.lang_code,
lang_pack="",
lang_pack=self.client.lang_pack,
query=raw.functions.help.GetConfig(),
)
),
Expand Down

0 comments on commit 5fa3e03

Please sign in to comment.