setGameScore
Use this method to set the score of the specified user in a game message.
Required: user_id, score · Optional: 5 parameters
Try it
TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("set_game_score", { user_id: 0, score: 0})Parameters
user_id number Required
User identifier.
score number Required
New score, must be non-negative.
force boolean
Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters.
disable_edit_message boolean
Pass True if the game message should not be automatically edited to include the current scoreboard.
chat_id number
Required if inline_message_id is not specified. Unique identifier for the target chat.
message_id number
Required if inline_message_id is not specified. Identifier of the sent message.
inline_message_id string
Required if chat_id and message_id are not specified. Identifier of the inline message.
Related methods
setBusinessAccountBio · setBusinessAccountGiftSettings · setBusinessAccountName · setBusinessAccountProfilePhoto · setBusinessAccountUsername · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setCustomEmojiStickerSetThumbnail · setMessageReaction · setMyCommands · setMyDefaultAdministratorRights · setMyDescription · setMyName · setMyProfilePhoto · setMyShortDescription · setPassportDataErrors · setStickerEmojiList · setStickerKeywords · setStickerMaskPosition · setStickerPositionInSet · setStickerSetThumbnail · setStickerSetTitle · setUserEmojiStatus · setWebhook