mini_apps.apps.tic_tac_toe

class mini_apps.apps.tic_tac_toe.Player(client: Client)

Bases: object

Keeps track of a player’s status

async send(**kwargs)

Sends a message to the player

class mini_apps.apps.tic_tac_toe.TicTacToe(*args)

Bases: App

Tic Tac Toe Game

async handle_message(client: Client, type: str, data: dict)

Handles messages received from the client

inline_buttons()

Returns the telegram inline button that opens the web app

async on_client_authenticated(client: Client)

Called when a client has been authenticated

async on_client_disconnected(client: Client)

Called when a client disconnects from the server

async on_telegram_inline(query: InlineQuery)

Called on telegram bot inline queries

async on_telegram_start(args: str, event: NewMessage)

Called when a user sends /start to the bot

async send_join_request(player: Player, game_id: str)

Sends a request from a player to join a specified game