Skip to content

set game score

Alexey Kravtsov edited this page May 19, 2020 · 1 revision

libtd-ktx / kotlinx.telegram.coroutines / setGameScore

setGameScore

suspend fun TelegramFlow.setGameScore(chatId: Long, messageId: 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.

messageId - Identifier of the message.

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 Message Describes a message.

Clone this wiki locally