libtd-ktx / kotlinx.telegram.extensions / MessageKtx / setGameScore
setGameScore
open suspend fun
Message
.setGameScore(chatId:
Long
, editMessage:
Boolean
, userId:
Int
, score:
Int
, force:
Boolean
):
Message
Suspend function, which updates the game score of the specified user in the game; for bots only.
Parameters
chatId
- The chat to which the message with the game belongs.
editMessage
- True, if the message should be edited.
userId
- User identifier.
score
- The new score.
force
- 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.
Return TdApi.Message Describes a message.