Skip to main content

ronami_core/payloads/
pin_chat_message.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::MessageId;
7use crate::types::Recipient;
8use crate::types::True;
9
10impl_payload! {
11    /// Use this method to pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. Returns _True_ on success.
12    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
13    pub PinChatMessage (PinChatMessageSetters) => True {
14        required {
15            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
16            pub chat_id: Recipient [into],
17            /// Identifier of a message to pin
18            #[serde(flatten)]
19            pub message_id: MessageId,
20        }
21        optional {
22            /// Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels.
23            pub disable_notification: bool,
24            /// Unique identifier of the business connection
25            pub business_connection_id: BusinessConnectionId,
26        }
27    }
28}