Telegram Bot icon

Telegram Bot

Interact with the Telegram Bot API – send messages, manage chats, handle payments, and more

Actions101

Game → Set Game Score

AI-generated

Summary

Set the score of a specified user in a Telegram game message or inline message.

Inputs

  • user_id (required) — Unique identifier of the target user whose score is being updated.
  • game_score (required) — The new non-negative score achieved by the user.
  • gameScoreAdditionalFields — Optional parameters to target the message (chat_id and message_id, or inline_message_id) and flags like force score update or disable message editing.

Output shape

a single record

Returns the updated Message object if sent by the bot, or a JSON object containing a boolean result standard response.

Examples

Example 1: Update a user high score in a specific chat message

Set User ID to 123456789, Score to 1500, and supply Chat ID and Message ID under Additional Fields.

Example 2: Force lower score update on an inline game message

Set User ID to 123456789, Score to 800, add Inline Message ID under Additional Fields, and set Force to true.

Links

Discussion