Skip to content

module Tourmaline::Client::GameMethods #

Direct including types

Tourmaline::Client

Methods#

#get_game_high_scores(user_id, chat_id = nil, message_id = nil, inline_message_id = nil) #

Use this method to get data for high score tables. Will return the score of the specified user and several of his neighbors in a game. On success, returns an Array of GameHighScore objects.

This method will currently return scores for the target user, plus two of his closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change.

View source

#send_game(chat_id, game_short_name, message_thread_id = nil, disable_notification = nil, reply_to_message_id = nil, reply_markup = nil) #

Use this method to send a game. On success, the sent Message is returned.

View source

#set_game_score(user_id, score, force = false, disable_edit_message = nil, chat_id = nil, message_id = nil, inline_message_id = nil) #

Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited Message, otherwise returns true.

Raises an error, if the new score is not greater than the user's current score in the chat and force is false (default).

View source