I'm trying to retrieve all the pinned messages in telegram chat for my bot. From the following code
prev_message = bot.get_chat(chat_id).pinned_message.text
I am able to retrieve the recent pinned messages. Is there a way to obtain all of the pinned messages as an array?. I'm using pytelegrambotapi for writing my bot.