Games
Part of the API Reference.
sendGame
Future<Json> sendGame(
int chatId,
String gameShortName, {
String? businessConnectionId,
int? messageThreadId,
bool? disableNotification,
bool? protectContent,
bool? allowPaidBroadcast,
String? messageEffectId,
ReplyParameters? replyParameters,
InlineKeyboardMarkup? replyMarkup,
}) async =>
Sends a Telegram Game (an HTML5 game registered with @BotFather).
setGameScore
Future<dynamic> setGameScore(
int userId,
int score, {
bool? force,
bool? disableEditMessage,
int? chatId,
int? messageId,
String? inlineMessageId,
}) =>
Updates a user’s score in a previously sent game message.
getGameHighScores
Future<List<Json>> getGameHighScores(
int userId, {
int? chatId,
int? messageId,
String? inlineMessageId,
}) async =>
Fetches the high score table for a game message.
Wrap each entry in GameHighScore for typed position, user (as User), and score access instead of indexing the raw JSON.