o
    -˜ŽjH  ã                   @   sB   d dl mZ d dlZd dlmZ d dlmZmZ G dd„ dƒZdS )é    )ÚUnionN)Úraw)ÚtypesÚutilsc                   @   sd   e Zd Z								ddddeeef dedededed	ed
edededed ddfdd„ZdS )ÚSendGameNÚselfzpyrogram.ClientÚchat_idÚgame_short_nameÚdisable_notificationÚmessage_thread_idÚbusiness_connection_idÚreply_to_message_idÚprotect_contentÚallow_paid_broadcastÚmessage_effect_idÚreply_markup)ztypes.InlineKeyboardMarkupztypes.ReplyKeyboardMarkupztypes.ReplyKeyboardRemoveztypes.ForceReplyÚreturnztypes.Messagec                 Ã   s  �t j| |||d�I dH }tjjj|  |¡I dH tjjtjj	tj 
¡ |d�d�d|p+d||  ¡ |||	|
r<|
 | ¡I dH ndd�
}|durS|  tjj||d�¡I dH }n|  |¡I dH }|jD ]-}t|tjjtjjtjjfƒr‹tjj| |jdd	„ |jD ƒd
d	„ |jD ƒ|d�I dH   S q^dS )uÚ  Send a game.

        .. include:: /_includes/usable-by/bots.rst

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).
                You can also use user profile/chat public link in form of *t.me/<username>* (str).

            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 (``bool``, *optional*):
                Sends the message silently.
                Users will receive a notification with no sound.

            message_thread_id (``int``, *optional*):
                Unique identifier of a message thread to which the message belongs.
                for supergroups only

            business_connection_id (``str``, *optional*):
                Business connection identifier.
                for business bots only.

            reply_to_message_id (``int``, *optional*):
                If the message is a reply, ID of the original message.

            protect_content (``bool``, *optional*):
                Protects the contents of the sent message from forwarding and saving.

            allow_paid_broadcast (``bool``, *optional*):
                Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots only

            message_effect_id (``int`` ``64-bit``, *optional*):
                Unique identifier of the message effect to be added to the message; for private chats only.

            reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
                An object for an inline keyboard. If empty, one â€˜Play game_titleâ€™ button will be shown automatically.
                If not empty, the first button must launch the game.

        Returns:
            :obj:`~pyrogram.types.Message`: On success, the sent game message is returned.

        Example:
            .. code-block:: python

                await app.send_game(chat_id, "gamename")
        )Úclientr   r   r   N)Úbot_idÚ
short_name©ÚidÚ )
ÚpeerÚmediaÚmessageÚsilentÚreply_toÚ	random_idÚ
noforwardsÚallow_paid_floodskipÚeffectr   )Úconnection_idÚqueryc                 S   ó   i | ]}|j |“qS © r   ©Ú.0Úir%   r%   ú\/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/bots/send_game.pyÚ
<dictcomp>�   ó    z&SendGame.send_game.<locals>.<dictcomp>c                 S   r$   r%   r   r&   r%   r%   r)   r*   Ž   r+   )r   )r   Úget_reply_tor   Ú	functionsÚmessagesÚ	SendMediaÚresolve_peerr   ÚInputMediaGameÚInputGameShortNameÚInputUserSelfÚrnd_idÚwriteÚinvokeÚInvokeWithBusinessConnectionÚupdatesÚ
isinstanceÚUpdateNewMessageÚUpdateNewChannelMessageÚUpdateBotNewBusinessMessageÚMessageÚ_parser   ÚusersÚchats)r   r   r	   r
   r   r   r   r   r   r   r   r   ÚrpcÚrr(   r%   r%   r)   Ú	send_game   s`   €Düþÿñþÿ
ýþüøÿzSendGame.send_game)NNNNNNNN)Ú__name__Ú
__module__Ú__qualname__r   ÚintÚstrÚboolrC   r%   r%   r%   r)   r      sH    ðÿ
þýüûúùø	÷
öÿõïr   )Útypingr   Úpyrogramr   r   r   r   r%   r%   r%   r)   Ú<module>   s
   