From fda763110cdba0dd29b9fcec9e91e4bb66accc18 Mon Sep 17 00:00:00 2001 From: dan63047 Date: Wed, 15 Apr 2020 13:45:05 +0300 Subject: [PATCH] !user_id hot fix --- dan63047bot.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dan63047bot.py b/dan63047bot.py index 7b2d84a..d7bda49 100644 --- a/dan63047bot.py +++ b/dan63047bot.py @@ -149,9 +149,11 @@ class VkBot: logger.warning("Ошибка метода users.get: " + str(lol)) return "Пользователь не найден
" + str(lol) - logger.info("Результат метода API users.get: " + str(user_info)) - if user_info[0]['first_name'] == "DELETED": - return "Профиль был удалён" + if "deactivated" in user_info[0]: + if user_info[0]['deactivated'] == 'banned': + return user_info[0]['first_name'] + " " + user_info[0]['last_name'] + " забанен" + elif user_info[0]['deactivated'] == 'deleted': + return "Профиль был удалён" if user_info[0]['is_closed']: is_closed = "Да"