Merge pull request #85 from Crax97/country_code

Requesting country code when the user forgets it
This commit is contained in:
Nameless 2020-06-22 21:50:16 +08:00 committed by GitHub
commit 73bb8b2de6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,12 @@ else:
os.makedirs(directory, exist_ok=True)
if not PHONE:
print(
"Enter your phone number in international format (including country code)"
)
PHONE = input("phone> ")
if not PHONE.startswith("+"):
PHONE = "+" + PHONE
with open(CONFIG_FILE, "w") as f:
f.write(f"PHONE = '{PHONE}'\n")