Skip to main content

teloxide_core_ng/payloads/
forward_message.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{EffectId, Message, MessageId, Recipient, Seconds, ThreadId};
6
7impl_payload! {
8    /// Use this method to forward messages of any kind. On success, the sent [`Message`] is returned.
9    ///
10    /// [`Message`]: crate::types::Message
11    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
12    pub ForwardMessage (ForwardMessageSetters) => Message {
13        required {
14            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
15            pub chat_id: Recipient [into],
16            /// Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`)
17            pub from_chat_id: Recipient [into],
18            /// Message identifier in the chat specified in _from\_chat\_id_
19            #[serde(flatten)]
20            pub message_id: MessageId,
21        }
22        optional {
23            /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
24            pub message_thread_id: ThreadId,
25            /// New start timestamp for the forwarded video in the message
26            pub video_start_timestamp: Seconds,
27            /// Sends the message [silently]. Users will receive a notification with no sound.
28            ///
29            /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
30            pub disable_notification: bool,
31            /// Protects the contents of sent messages from forwarding and saving
32            pub protect_content: bool,
33            /// Unique identifier of the message effect to be added to the message; for private chats only
34            pub message_effect_id: EffectId,
35        }
36    }
37}