Module telegram-bot-lua.methods.games
games API methods.
Functions
| api.get_game_high_scores(user_id, opts) | get high score data for a game. |
| api.send_game(chat_id, game_short_name, opts) | send a game to a chat. |
| api.set_game_score(user_id, score, opts) | set the score of the specified user in a game. |
Functions
- api.get_game_high_scores(user_id, opts)
-
get high score data for a game.
Parameters:
- user_id number identifier of the target user
- opts table optional parameters (chatid, messageid, inlinemessageid)
Returns:
- table|false array of GameHighScore objects, or false on failure
- string|table the HTTP status or error details
- api.send_game(chat_id, game_short_name, opts)
-
send a game to a chat.
Parameters:
- chat_id number unique identifier for the target chat
- game_short_name string short name of the game
- opts table optional parameters (messagethreadid, disablenotification, protectcontent, replyparameters, replymarkup, etc.)
Returns:
- table|false the sent message, or false on failure
- string|table the HTTP status or error details
- api.set_game_score(user_id, score, opts)
-
set the score of the specified user in a game.
Parameters:
- user_id number identifier of the target user
- score number new score, must be non-negative
- opts table optional parameters (force, disableeditmessage, chatid, messageid, inlinemessageid)
Returns:
- table|false the edited message or true on success, or false on failure
- string|table the HTTP status or error details