Skip to main content
Module

x/grammy/core/api.ts>Api#setGameScoreInline

The Telegram Bot Framework.
Very Popular
Go to Latest
method Api.prototype.setGameScoreInline
import { Api } from "https://deno.land/x/grammy@v1.11.1/core/api.ts";

Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

Parameters

inline_message_id: string

Identifier of the inline message

user_id: number

User identifier

score: number

New score, must be non-negative

optional
other: Other<R, "setGameScore",
| "chat_id"
| "message_id"
| "inline_message_id"
| "user_id"
| "score"
>

Optional remaining parameters, confer the official reference below

optional
signal: AbortSignal

Optional AbortSignal to cancel the request

Official reference: https://core.telegram.org/bots/api#setgamescore