ronami_core/payloads/send_game.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::ChatId;
7use crate::types::EffectId;
8use crate::types::Message;
9use crate::types::ReplyMarkup;
10use crate::types::ReplyParameters;
11use crate::types::ThreadId;
12
13impl_payload! {
14 /// Use this method to send a game. On success, the sent [`Message`] is returned.
15 ///
16 /// [`Message`]: crate::types::Message
17 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
18 pub SendGame (SendGameSetters) => Message {
19 required {
20 /// Unique identifier for the target chat
21 pub chat_id: ChatId [into],
22 /// Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.
23 pub game_short_name: String [into],
24 }
25 optional {
26 /// Unique identifier of the business connection on behalf of which the message will be sent
27 pub business_connection_id: BusinessConnectionId,
28 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
29 pub message_thread_id: ThreadId,
30 /// Sends the message [silently]. Users will receive a notification with no sound.
31 ///
32 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
33 pub disable_notification: bool,
34 /// Protects the contents of sent messages from forwarding and saving
35 pub protect_content: bool,
36 /// 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
37 pub allow_paid_broadcast: bool,
38 /// Unique identifier of the message effect to be added to the message; for private chats only
39 pub message_effect_id: EffectId,
40 /// Description of the message to reply to
41 pub reply_parameters: ReplyParameters,
42 /// A JSON-serialized object for an [inline keyboard]. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
43 ///
44 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
45 pub reply_markup: ReplyMarkup [into],
46 }
47 }
48}