ronami_core/payloads/send_dice.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::DiceEmoji;
7use crate::types::EffectId;
8use crate::types::Message;
9use crate::types::Recipient;
10use crate::types::ReplyMarkup;
11use crate::types::ReplyParameters;
12use crate::types::SuggestedPostParameters;
13use crate::types::ThreadId;
14use crate::types::TopicId;
15
16impl_payload! {
17 /// Use this method to send an animated emoji that will display a random value. On success, the sent [`Message`] is returned.
18 ///
19 /// [`Message`]: crate::types::Message
20 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
21 pub SendDice (SendDiceSetters) => Message {
22 required {
23 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
24 pub chat_id: Recipient [into],
25 }
26 optional {
27 /// Unique identifier of the business connection on behalf of which the message will be sent
28 pub business_connection_id: BusinessConnectionId,
29 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
30 pub message_thread_id: ThreadId,
31 /// Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
32 pub direct_messages_topic_id: TopicId,
33 /// Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”
34 pub emoji: DiceEmoji,
35 /// Sends the message [silently]. Users will receive a notification with no sound.
36 ///
37 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
38 pub disable_notification: bool,
39 /// Protects the contents of sent messages from forwarding and saving
40 pub protect_content: bool,
41 /// 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
42 pub allow_paid_broadcast: bool,
43 /// Unique identifier of the message effect to be added to the message; for private chats only
44 pub message_effect_id: EffectId,
45 /// 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.
46 pub suggested_post_parameters: SuggestedPostParameters,
47 /// Description of the message to reply to
48 pub reply_parameters: ReplyParameters,
49 /// 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. Not supported for messages sent on behalf of a business account.
50 ///
51 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
52 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
53 pub reply_markup: ReplyMarkup [into],
54 }
55 }
56}