ronami_core/payloads/set_game_score.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::Message;
6use crate::types::MessageId;
7use crate::types::UserId;
8
9impl_payload! {
10 /// 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.
11 ///
12 /// See also: [`SetGameScoreInline`](crate::payloads::SetGameScoreInline)
13 ///
14 /// [`Message`]: crate::types::Message
15 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
16 pub SetGameScore (SetGameScoreSetters) => Message {
17 required {
18 /// User identifier
19 pub user_id: UserId,
20 /// New score
21 pub score: u64,
22 /// Unique identifier for the target chat
23 pub chat_id: u32,
24 /// Identifier of the message to edit
25 #[serde(flatten)]
26 pub message_id: MessageId,
27 }
28 optional {
29 /// Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
30 pub force: bool,
31 /// Pass True, if the game message should not be automatically edited to include the current scoreboard
32 pub disable_edit_message: bool,
33 }
34 }
35}