#!venv/bin/python3
import config
import logging
from aiogram import Bot, Dispatcher, executor, types
# Объект бота
bot = Bot(token=config.API_TOKEN)
# Диспетчер для бота
dp = Dispatcher(bot)
# Включаем логирование, чтобы не пропустить важные сообщения
logging.basicConfig(level=
logging.INFO)
@dp.message_handler(commands="start")
async def cmd_start(message: types.Message):
keyboard = types.ReplyKeyboardMarkup(resize_keyboard=True)
keyboard.add(types.KeyboardButton(text="Запросить геолокацию", request_location=True))
await message.reply("your location", reply_markup=keyboard)
@dp.message_handler(content_types=types.ContentType.LOCATION)
async def service_location(message):
print(message.location)
destination = message.venue(
message.chat.id,
53.20040686227443,
53.23852761582218,
'xxxxxxx', 'yyyyyyy')
await message.answer(destination)
if
name == "
main":
# Запуск бота
executor.start_polling(dp, skip_updates=True)