
    i:                         S SK r S SKJr  S SKJrJrJr  S SKrS SKJrJrJ	r	J
r
  \ R                  " \5      r " S S5      rg)    N)datetime)ListOptionalUnion)enumsrawtypesutilsc            9       x   \ rS rSr                        S)SSS\\\4   S\S\S   S	\\S
      S\S   S\\	   S\\   S\\   S\\   S\\	   S\S   S\\
   S\\   S\\	   S\\   S\\	   S\\   S\S   S\\S      S\\   S\\\\4      S \\   S!\\   S"\\S
      S#\\   S$\\	   S%S&48S' jjrS(rg)*SendMessage   Nselfzpyrogram.Clientchat_idtext
parse_modezenums.ParseModeentitiesztypes.MessageEntitylink_preview_optionsztypes.LinkPreviewOptionsdisable_notificationmessage_thread_iddirect_messages_topic_id	effect_idshow_caption_above_mediareply_parametersztypes.ReplyParametersschedule_daterepeat_periodprotect_contentbusiness_connection_idallow_paid_broadcastpaid_message_star_countsuggested_post_parametersztypes.SuggestedPostParametersreply_markup)ztypes.InlineKeyboardMarkupztypes.ReplyKeyboardMarkupztypes.ReplyKeyboardRemoveztypes.ForceReplyreply_to_message_idreply_to_chat_idreply_to_story_id
quote_textquote_entitiesquote_offsetdisable_web_page_previewreturnztypes.Messagec                 0
  #    [        USLUSLUSLUSLUSLUSL45      (       a  Ub  [        R                  S5        Ub  [        R                  S5        Ub  [        R                  S5        Ub  [        R                  S5        Ub  [        R                  S5        Ub  [        R                  S5        [        R                  " UUUUUUUS9n[        USLU
SL45      (       aE  Ub  [        R                  S	5        U
b  [        R                  S
5        [        R
                  " UU
S9nU=(       d    U R                  n[        R                  " XX45      I Sh  vN R                  5       u  nnU R                  U5      I Sh  vN nU(       Ga  UR                  (       a  [        R                  R                  R                  U[        R                  R!                  UR                  UR"                  UR$                  SS9U=(       d    SUR&                  [        R(                  " U UUU5      I Sh  vN U R+                  5       [        R,                  " U5      UUUU(       a  UR/                  5       OSU(       a  UR/                  U 5      I Sh  vN OSUUUU	S9nO[        R                  R                  R1                  U[3        USS5      =(       d    SU=(       d    S[3        USS5      [        R(                  " U UUU5      I Sh  vN U R+                  5       [        R,                  " U5      UUUU(       a  UR/                  5       OSU(       a  UR/                  U 5      I Sh  vN OSUUUU	S9nU R5                  UUS9I Sh  vN n[7        U[        R                  R8                  5      (       Ga  U R                  U5      I Sh  vN n[7        U[        R                  R:                  5      (       a  UR<                  OUR>                  * n[        R@                  " URB                  [        RD                  " U[F        RH                  RJ                  U S9U[        RL                  " URN                  5      URP                  UU(       a5  U V s/ s H$  n [        RR                  RU                  SU 0 5      PM&     sn U S9$ SU S9$ [W        [Y        [        RZ                  " U US9I Sh  vN 5      S5      $  GN GNw GN GNo GN GN GN GNAs  sn f  N*7f)a   Send text messages.

.. include:: /_includes/usable-by/users-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).

    text (``str``):
        Text of the message to be sent.

    parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
        By default, texts are parsed using both Markdown and HTML styles.
        You can combine both syntaxes together.

    entities (List of :obj:`~pyrogram.types.MessageEntity`):
        List of special entities that appear in message text, which can be specified instead of *parse_mode*.

    link_preview_options (:obj:`~pyrogram.types.LinkPreviewOptions`, *optional*):
        Options used for link preview generation for the message.

    disable_notification (``bool``, *optional*):
        Sends the message silently.
        Users will receive a notification with no sound.

    message_thread_id (``int``, *optional*):
        Unique identifier for the target message thread (topic) of the forum.
        For forums only.

    direct_messages_topic_id (``int``, *optional*):
        Unique identifier of the topic in a channel direct messages chat administered by the current user.
        For directs only only.

    effect_id (``int``, *optional*):
        Unique identifier of the message effect.
        For private chats only.

    reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
        Describes reply parameters for the message that is being sent.

    schedule_date (:py:obj:`~datetime.datetime`, *optional*):
        Date when the message will be automatically sent.

    repeat_period (``int``, *optional*):
        Period after which the message will be sent again in seconds.

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

    business_connection_id (``str``, *optional*):
        Unique identifier of the business connection on behalf of which the message will be sent.

    allow_paid_broadcast (``bool``, *optional*):
        If True, you will be allowed to send 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.
        For bots only.

    paid_message_star_count (``int``, *optional*):
        The number of Telegram Stars the user agreed to pay to send the messages.

    suggested_post_parameters (:obj:`~pyrogram.types.SuggestedPostParameters`, *optional*):
        Information about the suggested post.

    reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
        Additional interface options. An object for an inline keyboard, custom reply keyboard,
        instructions to remove reply keyboard or to force a reply from the user.

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

Example:
    .. code-block:: python

        # Simple example
        await app.send_message("me", "Message sent with **Pyrogram**!")

        # Disable web page previews
        from pyrogram import types

        await app.send_message(
            "me",
            "https://docs.pyrogram.org",
            link_preview_options=types.LinkPreviewOptions(is_disabled=True)
        )

        # Reply to a message using its id
        from pyrogram import types

        await app.send_message(
            "me",
            "this is a reply",
            reply_parameters=types.ReplyParameters(message_id=123)
        )

        # Simple web page preview
        from pyrogram import types

        await app.send_message(
            "me",
            "Look at this preview!",
            link_preview_options=types.LinkPreviewOptions(url="https://docs.pyrogram.org")
        )

    .. code-block:: python

        # For bots only, send messages with keyboards attached

        from pyrogram.types import (
            ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton)

        # Send a normal keyboard
        await app.send_message(
            chat_id, "Look at that button!",
            reply_markup=ReplyKeyboardMarkup([["Nice!"]]))

        # Send an inline keyboard
        await app.send_message(
            chat_id, "These are inline buttons",
            reply_markup=InlineKeyboardMarkup(
                [
                    [InlineKeyboardButton("Data", callback_data="callback_data")],
                    [InlineKeyboardButton("Docs", url="https://docs.pyrogram.org")]
                ]))
Nzj`reply_to_message_id` is deprecated and will be removed in future updates. Use `reply_parameters` instead.zg`reply_to_chat_id` is deprecated and will be removed in future updates. Use `reply_parameters` instead.zh`reply_to_story_id` is deprecated and will be removed in future updates. Use `reply_parameters` instead.za`quote_text` is deprecated and will be removed in future updates. Use `reply_parameters` instead.ze`quote_entities` is deprecated and will be removed in future updates. Use `reply_parameters` instead.zc`quote_offset` is deprecated and will be removed in future updates. Use `reply_parameters` instead.)
message_idr   story_idquotequote_parse_moder&   quote_positionzs`disable_web_page_preview` is deprecated and will be removed in future updates. Use `link_preview_options` instead.zs`show_caption_above_media` is deprecated and will be removed in future updates. Use `link_preview_options` instead.)is_disabledshow_above_textT)urlforce_large_mediaforce_small_mediaoptional)peermediasilentinvert_mediareply_to	random_idr   schedule_repeat_periodallow_paid_floodskipallow_paid_starssuggested_postr!   messager   
noforwardseffectr0   r1   )r6   
no_webpager8   r9   r:   r;   r   r<   r=   r>   r?   r!   r@   r   rA   rB   )r   )idtypeclient)rD   chatr   dateoutgoingr!   r   rF   )rF   messages).anylogwarningr	   ReplyParametersLinkPreviewOptionsr   r
   parse_text_entitiesvaluesresolve_peerr2   r   	functionsrJ   	SendMediaInputMediaWebPageprefer_large_mediaprefer_small_mediar1   get_reply_tornd_iddatetime_to_timestampwriter   getattrinvoke
isinstanceUpdateShortSentMessageInputPeerUseruser_idr   MessagerD   Chatr   ChatTypePRIVATEtimestamp_to_datetimerH   outMessageEntity_parsenextiterparse_messages)!r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r@   r6   rpcrpeer_identitys!                                    S/app/mltbenv/lib/python3.13/site-packages/pyrogram/methods/messages/send_message.pysend_messageSendMessage.send_message   s    D #4/ ,!-$&d*D(	
 	
 #. A  +} !,~ %w ){ 'y  %44.(* !+-+  (4(4
 
 (3 J (3 J $)#;#;4 8$ 
  4Pt7P7P#(#<#<T#^^ffh&&w//$8$<$<--((22ii11,00&:&M&M&:&M&M!	 2  ,3t1AA$11$%,	   ++-#99-H'4%9!8D]8>>@cg?K<#5#5d#;;;QU!* 5 3 C: --((44"#7MUQU+3t$%9;LdS$11$%,	   ++-#99-H'4%9!8D]8>>@cg?K<#5#5d#;;;QU!* + 5 C0 ++c:P+QQa99::**733D dCII$;$;<< ll]  ==44ZZ//
 008)  #+"* ''..tVR@"*   $( $ Du334!LLMtTTo _/ < < R 4& Ms   ETS7)TS:B/T3S=4ATT A8T
TAT(T)TT		ATTCT+T<-T)T*T:T=T TTT	TTT )NNNNNNNNNNNNNNNNNNNNNNNN)__name__
__module____qualname____firstlineno__r   intstrr   r   boolr   rr   __static_attributes__rt       rq   r   r      sD   
 37:>EI/3+/26#'37>B,0'+*.04/315OS -16:+/$(@D&*37CBUBUsCxBU BU ./	BU
 4 567BU ''ABBU 'tnBU $C=BU #+3-BU C=BU #+4.BU ##:;BU  )BU  }BU "$BU  !)!BU" 'tn#BU$ "*#%BU& $,,K#L'BU( u 
 )BU6 &c]7BU8 #5c?39BU: $C=;BU< SM=BU> !&;!<=?BU@ smABUB #+4.CBUD 
EBU BUr}   r   )loggingr   typingr   r   r   pyrogramr   r   r	   r
   	getLoggerru   rL   r   rt   r}   rq   <module>r      s:   &   ( (  - -!CU CUr}   