def analiz(message):
while True:
try:
user_info = api.username_info(str(message.text))
break
except ClientError:
user_markup = telebot.types.ReplyKeyboardMarkup(True, False)
user_markup.row("В меню")
bot.send_message(message.from_user.id, "Проверь логин",
reply_markup=user_markup)
return