mirror of
https://github.com/paul-nameless/tg
synced 2024-11-29 07:10:19 +00:00
Merge pull request #85 from Crax97/country_code
Requesting country code when the user forgets it
This commit is contained in:
commit
73bb8b2de6
1 changed files with 5 additions and 0 deletions
|
@ -76,7 +76,12 @@ else:
|
||||||
os.makedirs(directory, exist_ok=True)
|
os.makedirs(directory, exist_ok=True)
|
||||||
|
|
||||||
if not PHONE:
|
if not PHONE:
|
||||||
|
print(
|
||||||
|
"Enter your phone number in international format (including country code)"
|
||||||
|
)
|
||||||
PHONE = input("phone> ")
|
PHONE = input("phone> ")
|
||||||
|
if not PHONE.startswith("+"):
|
||||||
|
PHONE = "+" + PHONE
|
||||||
|
|
||||||
with open(CONFIG_FILE, "w") as f:
|
with open(CONFIG_FILE, "w") as f:
|
||||||
f.write(f"PHONE = '{PHONE}'\n")
|
f.write(f"PHONE = '{PHONE}'\n")
|
||||||
|
|
Loading…
Reference in a new issue