setGameScore

Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

Arguments
Name Type Description Required
score int | array New score, must be non-negative yes
user_id int | null User identifier no
force bool | null Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters no
disable_edit_message bool | null Pass True if the game message should not be automatically edited to include the current scoreboard no
chat_id int | null Required if inline_message_id is not specified. Unique identifier for the target chat no
message_id int | null Required if inline_message_id is not specified. Identifier of the sent message no
inline_message_id string | null Required if chat_id and message_id are not specified. Identifier of the inline message no
token string | null You can use this method on another bot with specify this parameter no
forgot bool | null You can set to not receive request result, dont set it or pass null for turn it off no
answer bool | null You can set to answer to webhook, dont set it or pass null for turn it off no

Output : BPT\types\message | bool | BPT\types\responseError

Static or normal : Static

Examples :

request::setGameScore(score: int, user_id: int | null, force: bool | null, disable_edit_message: bool | null, chat_id: int | null, message_id: int | null, inline_message_id: string | null, token: String | null, forgot: Boolean | null, answer: Boolean | null);
request::setGameScore(['score' => int, 'user_id' => int | null, 'force' => bool | null, 'disable_edit_message' => bool | null, 'chat_id' => int | null, 'message_id' => int | null, 'inline_message_id' => string | null, 'token' => String | null, 'forgot' => Boolean | null, 'answer' => Boolean | null]);
request::setGameScore(score: int);
request::setGameScore(['score' => int]);