peyk.platforms.telegram.methods.send_game¶
- async peyk.platforms.telegram.methods.send_game(self, chat_id: int | str, game_short_name: str, *, business_connection_id: str | None = None, message_thread_id: int | None = None, disable_notification: bool | None = None, protect_content: bool | None = None, allow_paid_broadcast: bool | None = None, message_effect_id: str | None = None, reply_parameters: ReplyParameters | None = None, reply_markup: InlineKeyboardMarkup | None = None) Message¶
Use this method to send a game. On success, the sent Message is returned.
- Parameters:
chat_id – Unique identifier for the target chat or username of the target bot in the format @username. Games can’t be sent to channel direct messages chats and channel chats.
game_short_name – Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
disable_notification – Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast – Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balance.
message_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup – 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.
- Returns:
Result returned by Telegram on successful execution.
- Return type: