teloxide_core/payloads/send_shared_widget.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{
6 EffectId, Message, MessageEntity, ParseMode, Recipient, ReplyMarkup, ReplyParameters, ThreadId,
7 WidgetId,
8};
9
10impl_payload! {
11 /// Use this method to send again a shared widget created by the bot. Currently, in the production environment, widgets can be sent only to private chats, and sent widgets automatically have protected content and therefore can't be forwarded. On success, the sent [`Message`] is returned.
12 ///
13 /// [`Message`]: crate::types::Message
14 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
15 pub SendSharedWidget (SendSharedWidgetSetters) => Message {
16 required {
17 /// Unique identifier for the target chat or username of the target supergroup in the format `@username`
18 pub chat_id: Recipient [into],
19 /// Unique identifier of the shared widget
20 pub widget_id: WidgetId,
21 }
22 optional {
23 /// Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
24 pub message_thread_id: ThreadId,
25 /// Data of the widget, which is specific to the message, 0-1024 bytes
26 pub chat_data: String [into],
27 /// Widget caption, 0-1024 characters after entities parsing
28 pub caption: String [into],
29 /// Mode for parsing entities in the widget caption. See [formatting options] for more details.
30 ///
31 /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
32 pub parse_mode: ParseMode,
33 /// A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
34 pub caption_entities: Vec<MessageEntity> [collect],
35 /// Pass *True* if the caption must be shown above the widget
36 pub show_caption_above_media: bool,
37 /// Sends the message [silently]. Users will receive a notification with no sound.
38 ///
39 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
40 pub disable_notification: bool,
41 /// Protects the contents of the sent message from forwarding and saving
42 pub protect_content: bool,
43 /// Pass *True* 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.
44 ///
45 /// [broadcasting limits]: https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once
46 pub allow_paid_broadcast: bool,
47 /// Unique identifier of the message effect to be added to the message; for private chats only
48 pub message_effect_id: EffectId,
49 /// Description of the message to reply to
50 pub reply_parameters: ReplyParameters,
51 /// Additional interface options. A JSON-serialized object for an [inline keyboard], [custom reply keyboard], instructions to remove a reply keyboard or to force a reply from the user.
52 ///
53 /// [inline keyboard]: https://core.telegram.org/bots/features#inline-keyboards
54 /// [custom reply keyboard]: https://core.telegram.org/bots/features#keyboards
55 pub reply_markup: ReplyMarkup [into],
56 }
57 }
58}