mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
1.7 KiB
1.7 KiB
sendGame
Description
Use this method to send a game. On success, the sent Message is returned.
Arguments
| Name | Type | Description |
|---|---|---|
chat_id |
#!python3 int |
Unique identifier for the target chat |
game_short_name |
#!python3 str |
Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather. |
disable_notification |
#!python3 Optional[bool] |
Optional. Sends the message silently. Users will receive a notification with no sound. |
reply_to_message_id |
#!python3 Optional[int] |
Optional. If the message is a reply, ID of the original message |
reply_markup |
#!python3 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: #!python3 Message
Description: On success, the sent Message is returned.
Usage
As bot method bot
result: Message = await bot.send_game(...)
Method as object
Imports:
from aiogram.methods import SendGamefrom aiogram.api.methods import SendGamefrom 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(...)