sendGame

Description

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

Arguments

Name Type Description
chat_id int Unique identifier for the target chat
game_short_name str Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.
disable_notification Optional[bool] Optional. Sends the message silently. Users will receive a notification with no sound.
reply_to_message_id Optional[int] Optional. If the message is a reply, ID of the original message
reply_markup Optional[InlineKeyboardMarkup] Optional. A JSON-serialized object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown. If not empty, the first button must launch the game.

Response

Type: Message

Description: On success, the sent Message is returned.

Usage

As bot method

result: Message = await bot.send_game(...)

Method as object

Imports:

  • from aiogram.methods import SendGame
  • from aiogram.api.methods import SendGame
  • from aiogram.api.methods.send_game import SendGame

In handlers with current bot

result: Message = await SendGame(...)

With specific bot

result: Message = await bot(SendGame(...))

As reply into Webhook in handler

return SendGame(...)