pub struct CopyMessages { /* private fields */ }Expand description
Copies messages of any kind.
If some of the specified messages can’t be found or copied, they are skipped.
Service messages, paid media messages, giveaway messages, giveaway winners messages,
and invoice messages can’t be copied.
A quiz poll can be copied only if the value of the field correct_option_id is known to the bot.
The method is analogous to the method ForwardMessages,
but the copied messages don’t have a link to the original message.
Album grouping is kept for copied messages.
Implementations§
Source§impl CopyMessages
impl CopyMessages
Sourcepub fn new<A, B, C>(chat_id: A, from_chat_id: B, message_ids: C) -> CopyMessages
pub fn new<A, B, C>(chat_id: A, from_chat_id: B, message_ids: C) -> CopyMessages
Creates a new CopyMessages.
§Arguments
chat_id- Unique identifier for the target chat.from_chat_id- Unique identifier for the chat where the original messages were sent.message_ids- Identifiers of 1-100 messages in the chat from_chat_id to copy; the identifiers must be specified in a strictly increasing order.
Sourcepub fn with_direct_messages_topic_id(self, value: i64) -> CopyMessages
pub fn with_direct_messages_topic_id(self, value: i64) -> CopyMessages
Sets a new direct messages topic ID
value- Identifier of the direct messages topic to which the message will be sent.
Required if the message is sent to a direct messages chat.
Sourcepub fn with_disable_notification(self, value: bool) -> CopyMessages
pub fn with_disable_notification(self, value: bool) -> CopyMessages
Sets a new value for the disable_notification flag.
§Arguments
value- Indicates whether to send the message silently or not; a user will receive a notification without sound.
Sourcepub fn with_message_thread_id(self, value: i64) -> CopyMessages
pub fn with_message_thread_id(self, value: i64) -> CopyMessages
Sets a new message thread ID.
§Arguments
value- Unique identifier of the target message thread; supergroups only.
Sourcepub fn with_protect_content(self, value: bool) -> CopyMessages
pub fn with_protect_content(self, value: bool) -> CopyMessages
Sets a new value for the protect_content flag.
§Arguments
value- Indicates whether to protect the contents of the sent message from forwarding and saving.
Sourcepub fn with_remove_caption(self, value: bool) -> CopyMessages
pub fn with_remove_caption(self, value: bool) -> CopyMessages
Sets a new value for the remove_caption flag.
§Arguments
value- Indicates whether to copy the messages without their captions.
Trait Implementations§
Source§impl Clone for CopyMessages
impl Clone for CopyMessages
Source§fn clone(&self) -> CopyMessages
fn clone(&self) -> CopyMessages
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more