teloxide_core/payloads/
unpin_chat_message.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{BusinessConnectionId, MessageId, Recipient, True};
6
7impl_payload! {
8    /// Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns _True_ on success.
9    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
10    pub UnpinChatMessage (UnpinChatMessageSetters) => True {
11        required {
12            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
13            pub chat_id: Recipient [into],
14        }
15        optional {
16            /// Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
17            #[serde(flatten)]
18            pub message_id: MessageId,
19            /// Unique identifier of the business connection
20            pub business_connection_id: BusinessConnectionId,
21        }
22    }
23}