teloxide_core/payloads/send_dice.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{
6 BusinessConnectionId, DiceEmoji, EffectId, Message, Recipient, ReplyMarkup, ReplyParameters,
7 ThreadId,
8};
9
10impl_payload! {
11 /// Use this method to send an animated emoji that will display a random value. On success, the sent [`Message`] is returned.
12 ///
13 /// [`Message`]: crate::types::Message
14 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
15 pub SendDice (SendDiceSetters) => Message {
16 required {
17 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
18 pub chat_id: Recipient [into],
19 }
20 optional {
21 /// Unique identifier of the business connection on behalf of which the message will be sent
22 pub business_connection_id: BusinessConnectionId,
23 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
24 pub message_thread_id: ThreadId,
25 /// 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 “🎲”
26 pub emoji: DiceEmoji,
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 /// 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
34 pub allow_paid_broadcast: bool,
35 /// Unique identifier of the message effect to be added to the message; for private chats only
36 pub message_effect_id: EffectId,
37 /// Description of the message to reply to
38 pub reply_parameters: ReplyParameters,
39 /// 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.
40 ///
41 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
42 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
43 pub reply_markup: ReplyMarkup [into],
44 }
45 }
46}