简体   繁体   中英

Telegram Bot API C# How to get All Pinned Messages?

Telegram added the feature to pin more than one message. I'm doing it like this:

            var chat = botClient.GetChatAsync(chatid).Result;

            pinnedmsgtxt = chat.PinnedMessage.Text;

            pinnedmsg= chat.PinnedMessage;

but I can only get the last message that was pinned. Any way to get all of them? Am I missing something? I'm using https://github.com/TelegramBots/telegram.bot

Use messages.search method with inputMessagesFilterPinned filter.

Please read more here:

Pin API

Message Search API

Pinned messages filter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM