...
bot = Bot(token=...)
...
async def get_chat_history(user_id: int):
updates = await bot.get_updates()
chat_messages = [update.message for update in updates if update.message and update.message.chat.id == user_id]
return len(chat_messages), chat_messages[-1].message_id if chat_messages else None