Привет не уверен но попробуй так
from aiogram import Bot, types
from aiogram.dispatcher import Dispatcher
from aiogram.utils import markdown
API_TOKEN = 'YOUR_API_TOKEN'
bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)
@dp.inline_handler(lambda query: query.query == 'watch_profile')
async def inline_watch_profile(query: types.InlineQuery):
user_id = query.from_user.id
user_exmpl = int(user_id_date[user_id]['ID'])
profile_link = f"tg://user?id={user_exmpl}"
input_message_content = types.InputTextMessageContent(message_text=markdown.text(f"Профиль [пользователя]({profile_link})"),
parse_mode=types.ParseMode.MARKDOWN_V2)
inline_result = types.InlineQueryResultArticle(
id='1',
title='Просмотреть профиль',
input_message_content=input_message_content,
url=profile_link,
hide_url=True
)
await bot.answer_inline_query(query.id, results=[inline_result], cache_time=0)
if __name__ == '__main__':
from aiogram import executor
executor.start_polling(dp)