简体   繁体   English

Telegram Bot API C# 如何获取所有固定消息?

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

Telegram added the feature to pin more than one message. Telegram 添加了固定多条消息的功能。 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我正在使用https://github.com/TelegramBots/telegram.bot

Use messages.search method with inputMessagesFilterPinned filter.使用带有inputMessagesFilterPinned过滤器的messages.search方法。

Please read more here:请在此处阅读更多内容:

Pin API引脚 API

Message Search API留言搜索 API

Pinned messages filter 固定消息过滤器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C# 如何使用 Telegram API(不是 Bot API)从频道/联系人获取消息 - C# How to get messages from channel/contact using Telegram API (not Bot API) Telegram API(不是 Telegram Bot API?) - 如何获取整个聊天/频道中的所有消息? - Telegram API (NOT Telegram Bot API!) - how to get all messages in entire chat/channel? 如何使用Telegram bot API C#检查电报消息类型? - How to check telegram message type with Telegram bot api C#? 如何在 C# Telegram Bot API 中请求联系 - How to request contact in C# Telegram Bot API C#Telegram Bot API-如何发送链接并在客户端上打开 - C# Telegram Bot API - How send a link & open it on client C# WTelegramClient Telegram-API 如何以编程方式单击来自 Telegram-Bot 的消息中的按钮 - C# WTelegramClient Telegram-API How to programmatically click a button in a message from Telegram-Bot 如何在C#的电报bot上使用StringBuilder? - how to use StringBuilder on telegram bot with c#? 如何使用 Telegram API 从 Telegram 频道获取消息 - How can I get messages from a Telegram channel with the Telegram API C# Telegram Bot Api ReplyKeyboardMarkup 在里面使用 html - C# Telegram Bot Api ReplyKeyboardMarkup using html inside 在c#,MrRoundRobin API中创建动态键盘电报机器人 - create dynamic Keyboard telegram bot in c# , MrRoundRobin API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM