1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//! Generated by `codegen_payloads`, do not edit by hand.

use serde::Serialize;

use crate::types::{Message, MessageId, UserId};

impl_payload! {
    /// Use this method to set the score of the specified user in a game. On success, returns the edited [`Message`]. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
    ///
    /// See also: [`SetGameScoreInline`](crate::payloads::SetGameScoreInline)
    ///
    /// [`Message`]: crate::types::Message
    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
    pub SetGameScore (SetGameScoreSetters) => Message {
        required {
            /// User identifier
            pub user_id: UserId,
            /// New score
            pub score: u64,
            /// Unique identifier for the target chat
            pub chat_id: u32,
            /// Identifier of the message to edit
            #[serde(flatten)]
            pub message_id: MessageId,
        }
        optional {
            /// Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
            pub force: bool,
            /// Pass True, if the game message should not be automatically edited to include the current scoreboard
            pub disable_edit_message: bool,
        }
    }
}