
    {i                    b    S r SSKJr  SSKJr  SSKJr  SSKJr  \(       a  SSK	r	 " S S	5      r
g)
z#Provide the MessageableMixin class.    )annotations)TYPE_CHECKING   )API_PATH)_deprecate_argsNc                  N    \ rS rSrSr\" SSS5      SS.     S
S jj5       rS	rg)MessageableMixin   z+Interface for classes that can be messaged.subjectmessagefrom_subredditN)r   c                   UU[        U R                  SS5       U  3S.nU(       a  [        U5      US'   U R                  R	                  [
        S   US9  g)a  Send a message to a :class:`.Redditor` or a :class:`.Subreddit`'s moderators (modmail).

:param from_subreddit: A :class:`.Subreddit` instance or string to send the
    message from. When provided, messages are sent from the subreddit rather
    than from the authenticated user.

    .. note::

        The authenticated user must be a moderator of the subreddit and have the
        ``mail`` moderator permission.

:param message: The message content.
:param subject: The subject of the message.

For example, to send a private message to u/spez, try:

.. code-block:: python

    reddit.redditor("spez").message(subject="TEST", message="test message from PRAW")

To send a message to u/spez from the moderators of r/test try:

.. code-block:: python

    reddit.redditor("spez").message(
        subject="TEST", message="test message from r/test", from_subreddit="test"
    )

To send a message to the moderators of r/test, try:

.. code-block:: python

    reddit.subreddit("test").message(subject="TEST", message="test PM from PRAW")

MESSAGE_PREFIX )r   texttofrom_srcompose)dataN)getattr	__class__str_redditpostr   )selfr   r   r   r   s        _/home/james-whalen/.local/lib/python3.13/site-packages/praw/models/reddit/mixins/messageable.pyr   MessageableMixin.message   s\    X T^^-=rBCD6J

 !.1DO(9-D9     )r   z"praw.models.Subreddit | str | Noner   r   r   r   )__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__r   r   r   r	   r	      sE    5Y	+;< >B1: ;1: 	1:
 1: =1:r   r	   )r$   
__future__r   typingr   constr   utilr   prawr	   r   r   r   <module>r+      s$    ) "    $5: 5:r   