Log identifier if get_user_identifier method fails

This commit is contained in:
Davte 2019-07-20 19:29:00 +02:00
parent adf67c9ce1
commit ab63f56276
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it" __email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "2.1.22" __version__ = "2.1.23"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"

View File

@ -1662,7 +1662,7 @@ class Bot(TelegramBot, ObjectWithDatabase, MultiLanguageObject):
if isinstance(identifier, dict) and 'from' in identifier: if isinstance(identifier, dict) and 'from' in identifier:
identifier = identifier['from']['id'] identifier = identifier['from']['id']
assert type(identifier) is int, ( assert type(identifier) is int, (
"Unable to find a user identifier." f"Unable to find a user identifier. Got `{identifier}`"
) )
return identifier return identifier