UserKtx.setGameScore - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.extensions / UserKtx / setGameScore

setGameScore

open suspend fun User.setGameScore(chatId: Long, messageId: Long, editMessage: Boolean, 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.

messageId - Identifier of the message.

editMessage - True, if the message should be edited.

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.