pub struct SendRichMessage { /* private fields */ }Expand description
Sends rich messages.
If the message contains a block with a media element, then the bot must have the right to send the media to the chat.
Implementations§
Source§impl SendRichMessage
impl SendRichMessage
Sourcepub fn new<T>(chat_id: T, rich_message: InputRichMessage) -> SendRichMessage
pub fn new<T>(chat_id: T, rich_message: InputRichMessage) -> SendRichMessage
Creates a new SendRichMessage.
§Arguments
chat_id- Unique identifier of the target chat.rich_message- The message to be sent.
Sourcepub fn with_allow_paid_broadcast(self, value: bool) -> SendRichMessage
pub fn with_allow_paid_broadcast(self, value: bool) -> SendRichMessage
Sets a new value for the allow_paid_broadcast flag.
§Arguments
value- Whether to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message.
The relevant Stars will be withdrawn from the bot’s balance.
Sourcepub fn with_business_connection_id<T>(self, value: T) -> SendRichMessage
pub fn with_business_connection_id<T>(self, value: T) -> SendRichMessage
Sourcepub fn with_direct_messages_topic_id(self, value: i64) -> SendRichMessage
pub fn with_direct_messages_topic_id(self, value: i64) -> SendRichMessage
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) -> SendRichMessage
pub fn with_disable_notification(self, value: bool) -> SendRichMessage
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_ephemeral_message_parameters<T>(self, value: T) -> SendRichMessagewhere
T: Into<EphemeralMessageParameters>,
pub fn with_ephemeral_message_parameters<T>(self, value: T) -> SendRichMessagewhere
T: Into<EphemeralMessageParameters>,
Sets the new ephemeral message parameters.
§Arguments
value- An object containing the parameters of the ephemeral message to send.
Sourcepub fn with_message_effect_id<T>(self, value: T) -> SendRichMessage
pub fn with_message_effect_id<T>(self, value: T) -> SendRichMessage
Sets a new message effect ID.
§Arguments
value- Unique identifier of the message effect to be added to the message; for private chats only.
Sourcepub fn with_message_thread_id(self, value: i64) -> SendRichMessage
pub fn with_message_thread_id(self, value: i64) -> SendRichMessage
Sets a new message thread ID.
§Arguments
value- Unique identifier of the target message thread; for forum supergroups and private chats of bots with forum topic mode enabled only.
Sourcepub fn with_protect_content(self, value: bool) -> SendRichMessage
pub fn with_protect_content(self, value: bool) -> SendRichMessage
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_reply_markup<T>(self, value: T) -> SendRichMessagewhere
T: Into<ReplyMarkup>,
pub fn with_reply_markup<T>(self, value: T) -> SendRichMessagewhere
T: Into<ReplyMarkup>,
Sourcepub fn with_reply_parameters(self, value: ReplyParameters) -> SendRichMessage
pub fn with_reply_parameters(self, value: ReplyParameters) -> SendRichMessage
Sourcepub fn with_suggested_post_parameters(
self,
value: SuggestedPostParameters,
) -> SendRichMessage
pub fn with_suggested_post_parameters( self, value: SuggestedPostParameters, ) -> SendRichMessage
Sets a new suggested post parameters.
§Arguments
value- An object containing the parameters of the suggested post to send.
For direct messages chats only.
If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
Trait Implementations§
Source§impl Debug for SendRichMessage
impl Debug for SendRichMessage
Source§impl Method for SendRichMessage
impl Method for SendRichMessage
Source§fn into_payload(self) -> Result<Payload, PayloadError>
fn into_payload(self) -> Result<Payload, PayloadError>
Converts the method into a payload for an HTTP request.
Auto Trait Implementations§
impl !RefUnwindSafe for SendRichMessage
impl !UnwindSafe for SendRichMessage
impl Freeze for SendRichMessage
impl Send for SendRichMessage
impl Sync for SendRichMessage
impl Unpin for SendRichMessage
impl UnsafeUnpin for SendRichMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more