Update Telegram_phone_validation.py

This commit is contained in:
jowi-tech
2021-01-31 16:58:20 +01:00
committed by GitHub
parent 9da45017ab
commit fe943d5697

View File

@@ -16,7 +16,7 @@ def get_names(phone_number):
username = contacts.to_dict()['users'][0]['username']
del_usr = client(functions.contacts.DeleteContactsRequest(id=[username]))
if not username:
return f'No user name returned by the API for the number: {phone_number}'
return f'Response detected, but no user name returned by the API for the number: {phone_number}'
else:
return username
except IndexError as e: