api.setGameScore()
Updates the game score of the specified user in the game; for bots only
Parameters
SetGameScoreParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
chatId | number | The chat to which the message with the game belongs |
messageId | number | Identifier of the message |
editMessage | boolean | True, if the message needs to be edited |
userId | number | User identifier |
score | number | The new score |
force | boolean | Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'setGameScore' | 'error'
airgram: Airgram
request: {
method: 'setGameScore'
params: SetGameScoreParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}