setGameScore
Update a user's score in a Telegram game message; use force to allow lower scores for fixing mistakes or banning cheaters.
Instructions
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chat_id": "<chat_id>",
"message_id": "<message_id>",
"user_id": "<user_id>",
"score": "<score>"
},
"name": "setGameScore"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters. | |
| score | Yes | New score, must be non-negative | |
| chat_id | Yes | Unique identifier for the target chat | |
| user_id | Yes | User identifier | |
| message_id | Yes | Identifier of the sent message | |
| disable_edit_message | No | Pass True if the game message should not be automatically edited to include the current scoreboard |