mirror of
https://github.com/paul-nameless/tg
synced 2025-02-16 10:38:23 +00:00
Requesting country code when the user forgets it
This commit is contained in:
parent
e7b53eee3b
commit
950da8fa54
1 changed files with 6 additions and 0 deletions
|
@ -77,6 +77,12 @@ else:
|
|||
|
||||
if not PHONE:
|
||||
PHONE = input("phone> ")
|
||||
if not PHONE.startswith("+"):
|
||||
COUNTRY_CODE = input("country code> ")
|
||||
if not COUNTRY_CODE.startswith("+"):
|
||||
COUNTRY_CODE = "+" + COUNTRY_CODE
|
||||
|
||||
PHONE = COUNTRY_CODE + PHONE
|
||||
|
||||
with open(CONFIG_FILE, "w") as f:
|
||||
f.write(f"PHONE = '{PHONE}'\n")
|
||||
|
|
Loading…
Add table
Reference in a new issue