async def east_europe(message: types.Message): keyboard = UserGenerationKeyboard.west_africa() final_message = 'Выберите <b>страну</b>:' await message.answer(final_message, reply_markup=keyboard, parse_mode='HTML')
async def world_info(message:types.Message): keyboard = UserGenerationKeyboard.country_buttons() confirmed = covid.get_total_confirmed_cases() deaths = covid.get_total_deaths() recovered = covid.get_total_recovered() final_message = final_message = f"<b>Данные по всему миру🌎:</b>\n🦠Заболевших: {confirmed:,} <b>чел.</b>\n🧑⚕️Выздоровело: {recovered:,} <b>чел.</b>\n☠️Сметрей: {deaths:,} <b>чел.</b>" await message.answer(final_message, reply_markup=keyboard, parse_mode='HTML')
async def by_info(message:types.Message): keyboard = UserGenerationKeyboard.country_buttons() ukraine_cases = covid.get_status_by_country_name('belarus') confirmed = ukraine_cases['confirmed'] deaths = ukraine_cases['deaths'] recovered = ukraine_cases['recovered'] location = covid19.getLocationByCountryCode("BY") population = location[0]['country_population'] boleet = round(confirmed*100/population,2) umerlo = round(deaths*100/population,3) line = '-' * 30 final_message = f"<b>Данные в Беларуси⬜️🟥⬜️:</b>\n🦠Заболевших: {confirmed:,} <b>чел.</b>\n🧑⚕️Выздоровело: {recovered:,} <b>чел.</b>\n☠️Сметрей: {deaths:,} <b>чел.</b>\n{line}\nНаселение: {population:,} чел.\nБолеет: {boleet}% населения\nУмерло: {umerlo}% населения" await message.answer(final_message, reply_markup=keyboard, parse_mode='HTML')
async def other_countries(message:types.Message): keyboard = UserGenerationKeyboard.other_countries() final_message='Выберите <b>континент</b>:' await message.answer(final_message, reply_markup=keyboard, parse_mode='HTML')
async def america(message:types.Message): keyboard = UserGenerationKeyboard.american_countries() final_message = 'Выберите <b>регион</b>:' await message.answer(final_message, reply_markup=keyboard, parse_mode='HTML')
async def start(message:types.Message): await message.answer(f"*Привет, {message.from_user.first_name}\!*\nВыберите страну:", parse_mode='MarkdownV2', reply_markup=UserGenerationKeyboard.country_buttons())
async def backkk(message:types.Message): keyboard = UserGenerationKeyboard.europe_countries() final_message = 'Выберите <b>регион</b>!' await message.answer(final_message, reply_markup=keyboard, parse_mode='HTML')
async def back(message:types.Message): keyboard = UserGenerationKeyboard.country_buttons() final_message = 'Выберите <b>страну</b>!' await message.answer(final_message, reply_markup=keyboard, parse_mode='HTML')