diff --git a/robot.py b/robot.py index df4007c..38c5d33 100755 --- a/robot.py +++ b/robot.py @@ -71,7 +71,7 @@ def handle_url(bot, update): # noinspection PyBroadException def handle_rest(bot, update): file = None - if update.message.photo is not None: + if len(update.message.photo) > 0: photo = max(update.message.photo, key=lambda p: p.width) file = photo.file_id elif update.message.document is not None: