mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-11 08:44:50 +00:00
Add lang_pack to Client params
This commit is contained in:
parent
afe6319db5
commit
5fa3e0362c
2 changed files with 8 additions and 1 deletions
|
|
@ -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).
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -227,6 +232,7 @@ class Client(Methods):
|
|||
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,
|
||||
|
|
@ -258,6 +264,7 @@ class Client(Methods):
|
|||
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
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class Session:
|
|||
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(),
|
||||
)
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue