def get_weather(update, context): weather_type = context.user_data['weather']['weather_type'] airport_name = update.message.text.lower() if not airport_name or airport_name not in airports_icao_codes.keys(): update.message.reply_text('Не удалось определить ICAO-код аэропорта', reply_markup=create_keyboard('airports')) return 'choose_airport' weather = process_weather_handlers(airport_name, weather_type) if weather: update.message.reply_text(weather, reply_markup=create_keyboard('main')) return ConversationHandler.END return 'get_weather'
def our_choice(self, call): return utils.create_keyboard(utils.our_choice(call))
def city(self, call): return utils.create_keyboard(utils.city(call))
def state(self, call): return utils.create_keyboard(utils.state(call))
def country(self): return utils.create_keyboard(utils.country())
def weather_dontknow(update, context): update.message.reply_text('Я вас не понимаю, используйте клавиатуру', reply_markup=create_keyboard('weather_type'))
def greet_user(update, context): context.user_data['emoji'] = get_smile(context.user_data) update.message.reply_text( f'Здравствуй, пользователь! {context.user_data["emoji"]}', reply_markup=create_keyboard('main'))