
    cjh              
         U d Z ddlmZ ddlZddlmZmZmZmZ ddl	m
Z
 ddlmZmZmZ ddlmZmZmZmZ dd	lmZmZmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddl m!Z!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/ dZ0ertddl1m2Z2 ddlm3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9 ddl:m;Z; ddl<m=Z= ddl>m?Z? ddl@mAZA ddlBmCZC ddlDmEZE ddlFmGZG ddlHmIZJ ddlHmKZK dd lHmLZM dd!lHmNZO dd"lPmQZQ dd#lRmSZS ee9e7e8e5e3eGe4e6ef	   ZTe
j                  ZUd$eVd%<    G d& d'      ZI G d( d)      ZW G d* d+      ZX G d, d-e"      ZY G d. d/      ZN G d0 d1      ZL G d2 d3      ZZy)4ae  
The MIT License (MIT)

Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Pycord Development

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
    )annotationsN)TYPE_CHECKINGAny	CoroutineUnion   )utils)ChannelTypePartialMessageable_threaded_channel_factory)InteractionContextTypeInteractionResponseTypeInteractionTypetry_enum)ClientExceptionInteractionRespondedInvalidArgument)File)MessageFlags)Guild)Member)
AttachmentMessage)Entitlement)Object)Permissions)User)WebhookWebhookMessageasync_contexthandle_message_parameters)InteractionInteractionMessageInteractionResponseMessageInteractionInteractionMetadataAuthorizingIntegrationOwners)ClientSession)CategoryChannel	DMChannelForumChannelGroupChannelStageChannelTextChannelVoiceChannel)Client)OptionChoice)Embed)AllowedMentions)Poll)ConnectionState)Thread)r"   )InteractionData)r&   )r%   )Modal)Viewr   MISSINGc                  L   e Zd ZU dZdZded<   d%dZd&dZed'd       Z	ed(d       Z
d)d	Zd)d
Z ej                  d      d*d       Zed+d       Z ej                  d      d+d       Z ej                  d      d,d       Z ej                  d      d-d       Zd.dZ ej*                  dd      d        Zeeeeeeedddd
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d/dZ ej*                  dd      d        Zddd0dZ ej*                  d d      d!        Zd1d"Zd2d#Zd3d$Zy)4r"   a~  Represents a Discord interaction.

    An interaction happens when a user does an action that needs to
    be notified. Current examples are application commands, components, and modals.

    .. versionadded:: 2.0

    Attributes
    ----------
    id: :class:`int`
        The interaction's ID.
    type: :class:`InteractionType`
        The interaction type.
    guild_id: Optional[:class:`int`]
        The guild ID the interaction was sent from.
    channel: Optional[Union[:class:`abc.GuildChannel`, :class:`abc.PrivateChannel`, :class:`Thread`]]
        The channel the interaction was sent from.
    channel_id: Optional[:class:`int`]
        The ID of the channel the interaction was sent from.
    application_id: :class:`int`
        The application ID that the interaction was for.
    user: Optional[Union[:class:`User`, :class:`Member`]]
        The user or member that sent the interaction. Will be `None` in PING interactions.
    message: Optional[:class:`Message`]
        The message that sent this interaction.
    token: :class:`str`
        The token to continue the interaction. These are valid
        for 15 minutes.
    data: :class:`dict`
        The raw interaction data.
    locale: :class:`str`
        The user's locale.
    guild_locale: :class:`str`
        The guilds preferred locale, if invoked in a guild.
    custom_id: Optional[:class:`str`]
        The custom ID for the interaction.
    entitlements: list[:class:`Entitlement`]
        Entitlements that apply to the invoking user, showing access to premium SKUs.

        .. versionadded:: 2.5
    authorizing_integration_owners: :class:`AuthorizingIntegrationOwners`
        Contains the entities (users or guilds) that authorized this interaction.

        .. versionadded:: 2.6
    context: Optional[:class:`InteractionContextType`]
        The context in which this command was executed.

        .. versionadded:: 2.6
    )idtypeguild_idchannel
channel_iddataapplication_idmessageuserlocaleguild_localetokenversion	custom_identitlementscontextauthorizing_integration_owners_channel_data_message_data_guild_data_guild_permissions_app_permissions_state_session_original_response_cs_app_permissions_cs_response_cs_followup_cs_channeltuple[str, ...]	__slots__c               x    || _         |j                  j                  | _        d | _        | j                  |       y N)rS   http_HTTPClient__sessionrT   rU   
_from_dataselfrA   states      G/var/www/html/venv/lib/python3.12/site-packages/discord/interactions.py__init__zInteraction.__init__   s.    ',',zz'F'F=A    c                   t        |d         | _        t        t        |d         | _        |j                  d      | _        |d   | _        |d   | _        t        j                  |d      | _        t        j                  |d      | _        t        |d         | _        |j                  d	      | _        |j                  d
      | _        | j                  | j                  j                  d      nd | _        t        |j                  dd            | _        |j                  dg       D cg c]  }t%        || j&                         c}| _        d|v rt+        |d   | j&                        nt+        i | j&                        | _        d|v rt        t.        |d         nd | _        d | _        d | _        d | _        d| _        d | _        |j                  d      | _        | j>                  2| j<                  r&tA        | j<                  | j&                        | _        | j                  r| j>                  xs= | j&                  jC                  | j                        xs tE        | j                        }	 |d   }t        |j                  dd            | _        tG        |tD              sH| j&                  jH                  jJ                  }|jM                  |t        |d   d         |      | _        n>tO        | j&                  ||      | _        n 	 tS        | j&                  |d         | _        |j                  d      x}r|j                  d      x}tU        |      \  }}|tV        jX                  tV        jZ                  fv r% || j6                  || j&                        | _        nB| j>                  r6 || j>                  | j&                  |      | _        n| j\                  | _        || _/        |j                  d      x}	r'ta        | j&                  | j4                  |	      | _        |	| _1        y c c}w # tP        $ r Y w xY w# tP        $ r Y 'w xY w)Nr<   r=   rA   rG   rH   r@   r>   rB   rE   rF   rI   app_permissionsr   rJ   rA   rc   rL   rK   guild)r<   memberpermissionsrD   )rc   rA   rj   rc   rA   r?   )merA   rc   )rj   rc   rA   rC   rc   r?   rA   )2intr<   r   r   r=   getrA   rG   rH   r	   _get_as_snowflaker@   r>   rB   rE   rF   rI   rR   r   rS   rJ   r'   rL   r   rK   rC   r?   rD   rQ   rP   rO   rj   r   
_get_guildr   
isinstancemember_cache_flagsinteraction_get_and_update_memberr   KeyErrorr   r   r
   groupprivatecached_channelrM   r   rN   )
rb   rA   erj   rk   
cache_flagr?   ch_typefactorymessage_datas
             rd   r`   zInteraction._from_data   s   4:%-otF|%L	,0HHV,<	w-
 O&+&=&=dL&Q$)$;$;D*$M#&t,<'=#>"&((8"4(,(@*.))*?DIIMM+&T 	 &)2CQ)G%H<@HH^UW<X0
78KQdkk20
 047 ):;4;; .2T[[I 	+ D  +T)_= 	 (,*.	!"$(88G,::$"2"2T%5%5T[[IDK ==

 ,;;))$--8,T]]+ 
Th %(

=!(D$E!!%0!%!?!?!K!KJ % < <F6N4$8 9:!DI !'T[[vU SDI t{{fF	 hhy))7)";;v..;#<W#E {00+2E2EFF#*997$++$DL ZZ#*"jj'$DL  ..DL$88I..<."kk4<<lDL *W0
H    s*   -P;:Q  Q  	QQ	QQc                6    | j                   j                         S )z-Returns the client that sent the interaction.)rS   _get_clientrb   s    rd   clientzInteraction.client   s     {{&&((rf   c                    | j                   r| j                   S | j                  xr% | j                  j                  | j                        S )z(The guild the interaction was sent from.)rP   rS   rs   r>   r   s    rd   rj   zInteraction.guild%  s7     ;;;;{{Dt{{55dmmDDrf   c                <    | j                   t        j                  k(  S )z<Indicates whether the interaction is an application command.)r=   r   application_commandr   s    rd   
is_commandzInteraction.is_command,  s    yyO????rf   c                <    | j                   t        j                  k(  S )z9Indicates whether the interaction is a message component.)r=   r   	componentr   s    rd   is_componentzInteraction.is_component0  s    yyO5555rf   rY   c                   | j                   }|xr |j                  | j                        }|[| j                  N| j                  t        j
                  nt        j                  }t        | j                  | j                  |      S y|S )zThe channel the
        interaction was sent from.

        Note that due to a Discord limitation, DM channels are not resolved since there is
        no data to complete them. These are :class:`PartialMessageable` instead.
        N)rc   r<   r=   )	rj   _resolve_channelr@   r>   r
   textrz   r   rS   )rb   rj   r?   r=   s       rd   r{   zInteraction.cached_channel4  s     

CE224??C?* }}0  $$$,, 
 *++$//  rf   c                ,    t        | j                        S )zThe resolved permissions of the member in the channel, including overwrites.

        In a non-guild context where this doesn't apply, an empty permissions object is returned.
        )r   rQ   r   s    rd   rl   zInteraction.permissionsK  s     4,,--rf   rV   c                ,    t        | j                        S )zQThe resolved permissions of the application in the channel, including overwrites.)r   rR   r   s    rd   rh   zInteraction.app_permissionsS  s     40011rf   rW   c                    t        |       S )zReturns an object responsible for handling responding to the interaction.

        A response can only be done once. If secondary messages need to be sent, consider using :attr:`followup`
        instead.
        )r$   r   s    rd   responsezInteraction.responseX  s     #4((rf   rX   c                x    | j                   d| j                  d}t        j                  || j                        S )z7Returns the followup webhook for followup interactions.   )r<   r=   rG   ri   )rB   rG   r   
from_staterS   )rb   payloads     rd   followupzInteraction.followupa  s7     %%ZZ

 !!wdkkBBrf   c                  K   | j                   | j                   S | j                  }|t        d      t        j                         }| j
                  j                  }|j                  | j                  | j                  | j                  |j                  |j                         d{   }t        | | j
                        }t        |||      }|| _         |S 7 1w)a  |coro|

        Fetches the original interaction response message associated with the interaction.

        If the interaction response was :meth:`InteractionResponse.send_message` then this would
        return the message that was sent using that response. Otherwise, this would return
        the message that triggered the interaction.

        Repeated calls to this will return a cached value.

        Returns
        -------
        InteractionMessage
            The original interaction response message.

        Raises
        ------
        HTTPException
            Fetching the original response message failed.
        ClientException
            The channel for the message could not be resolved.
        Nz)Channel for message could not be resolved)rB   rG   sessionproxy
proxy_authro   )rU   r?   r   r    rq   rS   r^   !get_original_interaction_responserB   rG   rT   r   r   _InteractionMessageStater#   )rb   r?   adapterr^   rA   rc   rC   s          rd   original_responsezInteraction.original_responsek  s     0 "".*** ,,?!"MNN##%{{>>..**MM** ? 
 
 )t{{;$5'M")
s   B'C)C*2CzInteraction.original_responsez2.2c                >   K   | j                          d{   S 7 w)aj  An alias for :meth:`original_response`.

        Returns
        -------
        InteractionMessage
            The original interaction response message.

        Raises
        ------
        HTTPException
            Fetching the original response message failed.
        ClientException
            The channel for the message could not be resolved.
        N)r   r   s    rd   original_messagezInteraction.original_message  s       ++----s   NF
contentembedsembedfilefilesattachmentsviewallowed_mentionsdelete_aftersuppressc       
          K   | j                   j                  }t        ||||||||||

      }t        j                         }| j                   j
                  }|j                  | j                  | j                  | j                  |j                  |j                  |j                  |j                  |j                         d{   }t        | | j                         }t!        || j"                  |      }|r=|j%                         s-||_        | j                   j)                  ||j*                         |	| j-                  |	       d{    |S 7 7 w)a	  |coro|

        Edits the original interaction response message.

        This is a lower level interface to :meth:`InteractionMessage.edit` in case
        you do not want to fetch the message and save an HTTP request.

        This method is also the only way to edit the original message if
        the message sent was ephemeral.

        Parameters
        ----------
        content: Optional[:class:`str`]
            The content to edit the message with or ``None`` to clear it.
        embeds: List[:class:`Embed`]
            A list of embeds to edit the message with.
        embed: Optional[:class:`Embed`]
            The embed to edit the message with. ``None`` suppresses the embeds.
            This should not be mixed with the ``embeds`` parameter.
        file: :class:`File`
            The file to upload. This cannot be mixed with ``files`` parameter.
        files: List[:class:`File`]
            A list of files to send with the content. This cannot be mixed with the
            ``file`` parameter.
        attachments: List[:class:`Attachment`]
            A list of attachments to keep in the message. If ``[]`` is passed
            then all attachments are removed.
        allowed_mentions: :class:`AllowedMentions`
            Controls the mentions being processed in this message.
            See :meth:`.abc.Messageable.send` for more information.
        view: Optional[:class:`~discord.ui.View`]
            The updated view to update this message with. If ``None`` is passed then
            the view is removed.
        delete_after: Optional[:class:`float`]
            If provided, the number of seconds to wait in the background
            before deleting the message we just edited. If the deletion fails,
            then it is silently ignored.
        suppress: :class:`bool`
            Whether to suppress embeds for the message.

        Returns
        -------
        :class:`InteractionMessage`
            The newly edited message.

        Raises
        ------
        HTTPException
            Editing the message failed.
        Forbidden
            Edited a message that is not yours.
        TypeError
            You specified both ``embed`` and ``embeds`` or ``file`` and ``files``
        ValueError
            The length of ``embeds`` was invalid.
        )
r   r   r   r   r   r   r   r   previous_allowed_mentionsr   )r   r   r   r   	multipartr   Nro   delay)rS   r   r!   r    rq   r^   "edit_original_interaction_responserB   rG   rT   r   r   r   r   r   r   r#   r?   is_finishedrC   
store_viewr<   delete_original_response)rb   r   r   r   r   r   r   r   r   r   r   previous_mentionsparamsr   r^   rA   rc   rC   s                     rd   edit_original_responsez"Interaction.edit_original_response  s6    N 59KK4P4P*#-&7
  ##%{{??JJMM**NN&&,, @ 	
 	
 )t{{;$5$,,TR((*"DLKK""44#//l/CCC+	
& Ds%   CEEBEEEEz"Interaction.edit_original_responsec                B   K    | j                   di | d{   S 7 w)a  An alias for :meth:`edit_original_response`.

        Returns
        -------
        :class:`InteractionMessage`
            The newly edited message.

        Raises
        ------
        HTTPException
            Editing the message failed.
        Forbidden
            Edited a message that is not yours.
        TypeError
            You specified both ``embed`` and ``embeds`` or ``file`` and ``files``
        ValueError
            The length of ``embeds`` was invalid.
        N )r   rb   kwargss     rd   edit_original_messagez!Interaction.edit_original_message  s$     ( 1T00:6::::   r   c               :  K   t        j                         }| j                  j                  }|j	                  | j
                  | j                  | j                  |j                  |j                        }|t        j                  ||       y| d{    y7 w)a  |coro|

        Deletes the original interaction response message.

        This is a lower level interface to :meth:`InteractionMessage.delete` in case
        you do not want to fetch the message and save an HTTP request.

        Parameters
        ----------
        delay: Optional[:class:`float`]
            If provided, the number of seconds to wait before deleting the message.
            The waiting is done in the background and deletion failures are ignored.

        Raises
        ------
        HTTPException
            Deleting the message failed.
        Forbidden
            Deleted a message that is not yours.
        )r   r   r   N)r    rq   rS   r^   $delete_original_interaction_responserB   rG   rT   r   r   r	   
delay_task)rb   r   r   r^   funcs        rd   r   z$Interaction.delete_original_response.  s~     *  ##%{{;;JJMM** < 
 UD)JJs   BBBBz$Interaction.delete_original_responsec                B   K    | j                   di | d{   S 7 w)zAn alias for :meth:`delete_original_response`.

        Raises
        ------
        HTTPException
            Deleting the message failed.
        Forbidden
            Deleted a message that is not yours.
        Nr   )r   r   s     rd   delete_original_messagez#Interaction.delete_original_messageR  s$      3T22<V<<<<r   c                @  K   	 | j                   j                         s$ | j                   j                  |i | d{   S  | j                  j                  |i | d{   S 7 (7 # t
        $ r(  | j                  j                  |i | d{  7  cY S w xY ww)aw  |coro|

        Sends either a response or a message using the followup webhook determined by whether the interaction
        has been responded to or not.

        Returns
        -------
        Union[:class:`discord.Interaction`, :class:`discord.WebhookMessage`]:
            The response, its type depending on whether it's an interaction response or a followup.
        N)r   is_donesend_messager   sendr   rb   argsr   s      rd   respondzInteraction.respond_  s     	===((*7T]]77HHHH/T]]//@@@@ I@# 	=+++T<V<<<<	=sb   B9A* A&A* BA* !A("A* %B&A* (A* *(BBBBBBc                  K   	 | j                   j                         s$ | j                   j                  |i | d{   S  | j                  |i | d{   S 7 7 # t        $ r  | j                  |i | d{  7  cY S w xY ww)a  |coro|

        Either respond to the interaction with an edit_message or edits the existing response, determined by
        whether the interaction has been responded to or not.

        Returns
        -------
        Union[:class:`discord.InteractionMessage`, :class:`discord.WebhookMessage`]:
            The response, its type depending on whether it's an interaction response or a followup.
        N)r   r   edit_messager   r   r   s      rd   editzInteraction.editr  s     	F==((*7T]]77HHHH8T88$I&III II# 	F444dEfEEEE	Fsb   B
9A  AA  B
A  AA  B
A  A   B>B?BB
BB
c                    | j                   | j                  | j                  j                  | j                  | j
                  d}| j                  | j                  |d<   | j                  j                  d      x}r| j                  ~|j                  d      x}r,|j                  | j                  j                         x}r||d<   |j                  d      x}r,|j                  | j                  j                         x}r||d<   | j                  | j                  |d<   | j                  | j                  |d	<   | j                  r| j                  |d
<   | j                  r| j                  |d<   | j                  r| j                  |d<   |S )z
        Converts this interaction object into a dict.

        Returns
        -------
        Dict[:class:`str`, Any]
            A dictionary of :class:`str` interaction keys bound to the respective value.
        )r<   rB   r=   rG   rH   rA   resolvedusersrD   membersrk   r>   r@   rE   rF   rC   )r<   rB   r=   valuerG   rH   rA   rq   rD   r>   r@   rE   rF   rN   )rb   rA   r   r   rD   r   rk   s          rd   to_dictzInteraction.to_dict  sZ    ''"11IIOOZZ||
 99 99DL IIMM*555499;P%\\'22E2!IIdiill33D3#'DL'||I66G6%kk$)),,77F7%+DN==$#}}D??&!%D;;![[DN#'#4#4D "00DOrf   )rA   InteractionPayloadrc   r5   )rA   r   )returnr0   r   zGuild | Noner   bool)r   zInteractionChannel | None)r   r   )r   r$   )r   r   )r   r#   )r   
str | Noner   list[Embed]r   Embed | Noner   r   r   
list[File]r   list[Attachment]r   View | Noner   AllowedMentions | Noner   float | Noner   r   r   r#   r   r   r   None)r   zInteraction | WebhookMessage)r   zInteractionMessage | None)r   dict[str, Any])__name__
__module____qualname____doc__r[   __annotations__re   r`   propertyr   rj   r   r   r	   cached_slot_propertyr{   rl   rh   r   r   r   
deprecatedr   r:   r   r   r   r   r   r   r   r   rf   rd   r"   r"   j   s$   0d"I BZ*x ) ) E E@6  U. /, . .  U 562 72  U/) 0)  U/C 0C,\ U5u=. >.( &%%#(/#37%)k k 	k
 k k k &k k 1k #k k 
kZ U:EB; C;* GK "H U<eD
= E
==&F&-rf   r"   c                  8   e Zd ZU dZdZded<   ddZddZddd	dd
ZddZ		 dddddddddddd
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
eeeeeeededd
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 ddZddZ ej                   dd      d d       Zd!dZy)"r$   zRepresents a Discord interaction response.

    This type can be accessed through :attr:`Interaction.response`.

    .. versionadded:: 2.0
    )
_responded_parent_response_lockrZ   r[   c                R    || _         d| _        t        j                         | _        y )NF)r   r   asyncioLockr   )rb   parents     rd   re   zInteractionResponse.__init__  s    $* %%llnrf   c                    | j                   S )zIndicates whether an interaction response has been done before.

        An interaction can only be responded to once.
        )r   r   s    rd   r   zInteractionResponse.is_done  s    
 rf   FT)	ephemeral	invisiblec                 K   | j                   rt        | j                        d}d}| j                  }|j                  t        j
                  u s|j                  t        j                  u r?|rt        j                  j                  nt        j                  j                  }|sC|rAddi}n<|j                  t        j                  u r t        j                  j                  }|rddi}|rt        j                         }|j                  j                  }| j!                  |j#                  |j$                  |j&                  |j(                  |||j*                  |j,                               d{    d| _         yy7 w)a]  |coro|

        Defers the interaction response.

        This is typically used when the interaction is acknowledged
        and a secondary action will be done later.

        This can only be used with the following interaction types:

        - :attr:`InteractionType.application_command`
        - :attr:`InteractionType.component`
        - :attr:`InteractionType.modal_submit`

        .. note::
            The follow-up response will also be non-ephemeral if the `ephemeral`
            argument is ``False``, and ephemeral if ``True``.

        Parameters
        ----------
        ephemeral: :class:`bool`
            Indicates whether the deferred message will eventually be ephemeral.
            This only applies to :attr:`InteractionType.application_command` interactions,
            or if ``invisible`` is ``False``.
        invisible: :class:`bool`
            Indicates whether the deferred type should be 'invisible'
            (:attr:`InteractionResponseType.deferred_message_update`)
            instead of 'thinking' (:attr:`InteractionResponseType.deferred_channel_message`).
            In the Discord UI, this is represented as the bot thinking of a response. You must
            eventually send a followup message via :attr:`Interaction.followup` to make this thinking state go away.
            This parameter does not apply to interactions of type :attr:`InteractionType.application_command`.

        Raises
        ------
        HTTPException
            Deferring the interaction failed.
        InteractionResponded
            This interaction has already been responded to before.
        r   Nflags@   )r   r=   rA   r   r   T)r   r   r   r=   r   r   modal_submitr   deferred_message_updater   deferred_channel_messager   r    rq   rS   r^   _locked_responsecreate_interaction_responser<   rG   rT   r   r   )rb   r   r   
defer_typerA   r   r   r^   s           rd   deferzInteractionResponse.defer  sF    N ??&t||44
&*KK?444{{o:::  (??EE,EEKK 
 }[[O???0IIOOJ}#'')G==%%D''33IILL"OO#**# 4 
 
 
 #DO 
s   E-E?/E=0E?c           
       K   | j                   rt        | j                        | j                  }|j                  t        j
                  u rt        j                         }|j                  j                  }| j                  |j                  |j                  |j                  |j                  |j                  |j                   t"        j$                  j&                               d{    d| _         yy7 w)a  |coro|

        Pongs the ping interaction.

        This should rarely be used.

        Raises
        ------
        HTTPException
            Ponging the interaction failed.
        InteractionResponded
            This interaction has already been responded to before.
        r   r   r   r=   NT)r   r   r   r=   r   pingr    rq   rS   r^   r   r   r<   rG   rT   r   r   r   pongr   rb   r   r   r^   s       rd   r  zInteractionResponse.pong  s      ??&t||44;;/...#'')G==%%D''33IILL"OO**#055;; 4 	 	 	 #DO /	s   C'C9)C7*C9N)
r   r   r   ttsr   r   r   r   pollr   c       
        V  K   | j                   rt        | j                        d|i}||t        d      ||g}|r:t	        |      dkD  rt        d      |D cg c]  }|j                          c}|d<   |t        |      |d<   |rd|d	<   ||j                         |d
<   |
|
j                         |d<   | j                  j                  }|,|j                  xr |j                  j                         |d<   nL|j                  -|j                  j                  |      j                         |d<   n|j                         |d<   ||	t        d      |t        |t              st        d      |g}	|	6t	        |	      dkD  rt        d      t        d |	D              st        d      | j                  }t!        j"                         }|j                  j$                  }	 | j'                  |j)                  |j*                  |j,                  |j.                  t0        j2                  j4                  |j6                  |j8                  ||	             d{    |	r|	D ]  }|j;                           	 |K|r|j<                  d|_        | j                  |_        | j                  j                  jA                  |       d| _         |$| j                  jC                  |       d{    | j                  S c c}w 7 # |	r|	D ]  }|j;                           w w xY w7 6w)a  |coro|

        Responds to this interaction by sending a message.

        Parameters
        ----------
        content: Optional[:class:`str`]
            The content of the message to send.
        embeds: List[:class:`Embed`]
            A list of embeds to send with the content. Maximum of 10. This cannot
            be mixed with the ``embed`` parameter.
        embed: :class:`Embed`
            The rich embed for the content to send. This cannot be mixed with
            ``embeds`` parameter.
        tts: :class:`bool`
            Indicates if the message should be sent using text-to-speech.
        view: :class:`discord.ui.View`
            The view to send with the message.
        ephemeral: :class:`bool`
            Indicates if the message should only be visible to the user who started the interaction.
            If a view is sent with an ephemeral message, and it has no timeout set then the timeout
            is set to 15 minutes.
        allowed_mentions: :class:`AllowedMentions`
            Controls the mentions being processed in this message.
            See :meth:`.abc.Messageable.send` for more information.
        delete_after: :class:`float`
            If provided, the number of seconds to wait in the background
            before deleting the message we just sent.
        file: :class:`File`
            The file to upload.
        files: List[:class:`File`]
            A list of files to upload. Must be a maximum of 10.
        poll: :class:`Poll`
            The poll to send.

            .. versionadded:: 2.6

        Returns
        -------
        :class:`.Interaction`
            The interaction object associated with the sent message.

        Raises
        ------
        HTTPException
            Sending the message failed.
        TypeError
            You specified both ``embed`` and ``embeds``.
        ValueError
            The length of ``embeds`` was invalid.
        InteractionResponded
            This interaction has already been responded to before.
        r  Nz-cannot mix embed and embeds keyword arguments
   z+embeds cannot exceed maximum of 10 elementsr   r   r   r   
componentsr  r   z3cannot pass both file and files parameter to send()zfile parameter must be File3files parameter must be a list of up to 10 elementsc              3  <   K   | ]  }t        |t                y wr]   rt   r   .0r   s     rd   	<genexpr>z3InteractionResponse.send_message.<locals>.<genexpr>       BDD$/B   &files parameter must be a list of Filer   r=   r   r   rA   r   g      @Tr   )"r   r   r   	TypeErrorlen
ValueErrorr   strto_componentsrS   r   merger   rt   r   allr    rq   r^   r   r   r<   rG   rT   r   channel_messager   r   r   closetimeoutr   r   r   )rb   r   r   r   r   r  r   r   r   r   r  r   r   r|   rc   r   r   r^   s                     rd   r   z InteractionResponse.send_message=  s*    H ??&t||44 3#
 !3KLLWF6{R !NOO6< = =GH!$WGI!GG$($6$6$8GL!"llnGFO###&&K5+A+A+I+I+K &' ##/*/*@*@*F*F +gi &' +;*B*B*DG&' 1!"WXXdD)%&CDD5zB%I  BEBB%&NOO##%}}!!	!''33IILL"OO0@@FF**#  4 	   ! !DJJL! T\\1(,,DKLL**40#,,77l7KKK||W !>` ! !DJJL!  LsK   AL)L2E4L)'A5L LL !BL)0L'1L)L L$$L))
r   r   r   r   r   r   r   r   r   r   c       
          K   | j                   rt        | j                        | j                  }|j                  }|j                  }|r|j
                  nd}|j                  t        j                  t        j                  fvryi }|t        ur|dn
t        |      |d<   |t        ur|t        urt        d      |t        ur|g n|g}|t        ur!|D cg c]  }|j                          c}|d<   |t        ur!|D cg c]  }|j                          c}|d<   |t        ur(|j                  |       |g n|j                         |d<   |t        ur|t        urt!        d      |t        urMt#        |t$              st!        d      |g}d|vr+|j&                  D cg c]  }|j                          c}|d<   |t        uret)        |      d	kD  rt!        d
      t+        d |D              st!        d      d|vr+|j&                  D cg c]  }|j                          c}|d<   |	t        urSt-        j.                  | j                  j                  j0                  j2                        }|	|_        |j2                  |d<   |
,|j6                  xr |j6                  j                         |d<   nL|j6                  -|j6                  j9                  |
      j                         |d<   n|
j                         |d<   t;        j<                         }|j                  j>                  }	 | jA                  |jC                  |j
                  |jD                  |jF                  tH        jJ                  j2                  |jL                  |jN                  ||             d{    |r|D ]  }|jQ                           	 |r)|jS                         s||_        |jU                  ||       d| _         |%| j                  jW                  |       d{    yyc c}w c c}w c c}w c c}w 7 # |r|D ]  }|jQ                           w w xY w7 ;w)a^	  |coro|

        Responds to this interaction by editing the original message of
        a component or modal interaction.

        Parameters
        ----------
        content: Optional[:class:`str`]
            The new content to replace the message with. ``None`` removes the content.
        embeds: List[:class:`Embed`]
            A list of embeds to edit the message with.
        embed: Optional[:class:`Embed`]
            The embed to edit the message with. ``None`` suppresses the embeds.
            This should not be mixed with the ``embeds`` parameter.
        file: :class:`File`
            A new file to add to the message. This cannot be mixed with ``files`` parameter.
        files: List[:class:`File`]
            A list of new files to add to the message. Must be a maximum of 10. This
            cannot be mixed with the ``file`` parameter.
        attachments: List[:class:`Attachment`]
            A list of attachments to keep in the message. If ``[]`` is passed
            then all attachments are removed.
        view: Optional[:class:`~discord.ui.View`]
            The updated view to update this message with. If ``None`` is passed then
            the view is removed.
        delete_after: Optional[:class:`float`]
            If provided, the number of seconds to wait in the background
            before deleting the message we just edited. If the deletion fails,
            then it is silently ignored.
        suppress: Optional[:class:`bool`]
            Whether to suppress embeds for the message.
        allowed_mentions: Optional[:class:`~discord.AllowedMentions`]
            Controls the mentions being processed in this message. If this is
            passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`.
            The merging behaviour only overrides attributes that have been explicitly passed
            to the object, otherwise it uses the attributes set in :attr:`~discord.Client.allowed_mentions`.
            If no object is passed at all then the defaults given by :attr:`~discord.Client.allowed_mentions`
            are used instead.

        Raises
        ------
        HTTPException
            Editing the message failed.
        TypeError
            You specified both ``embed`` and ``embeds``.
        InteractionResponded
            This interaction has already been responded to before.
        Nr   z2cannot mix both embed and embeds keyword argumentsr   r   r  z;cannot pass both file and files parameter to edit_message()zfile parameter must be a Filer
  r  c              3  <   K   | ]  }t        |t                y wr]   r  r  s     rd   r  z3InteractionResponse.edit_message.<locals>.<genexpr>K  r  r  r  r   r   r  Tr   ),r   r   r   rC   rS   r<   r=   r   r   r   r:   r  r  r   prevent_view_updates_forr  r   rt   r   r   r  r  r   _from_valuer   r   suppress_embedsr   r  r    rq   r^   r   r   rG   rT   r   message_updater   r   r  r   r   r   )rb   r   r   r   r   r   r   r   r   r   r   r   msgrc   
message_idr   r|   ar   r   r^   s                        rd   r   z InteractionResponse.edit_message  s    | ??&t||44nn"SVV
;;88/:V:VWW'!)0c'lGIF'$9PQQ =RugF 6< = =GHg%;F%Gaaiik%GGM"w**:6*.,BD<N<N<PGL!w5#7!M  wdD)%&EFF /CF??-Saaiik-SGM*5zB%I  BEBB%&NOOG+?B)O!!))+)O&7" ,,T\\-A-A-G-G-M-MNE$,E!${{GG#&&K5+A+A+I+I+K &' ##/*/*@*@*F*F +gi &' +;*B*B*DG&'##%}}!!	!''33IILL"OO0??EE**#  4 	   ! !DJJL! ((*DLT:.#,,77l7KKK $Y !> &H$ .T *P, ! !DJJL!  Lsq   CQP.Q PB	Q P"7AQP'$DQ*A5P. P, P. $A-QQQ,P. .Q

Qc               B  K   | j                   rt        | j                        | j                  }|j                  t        j
                  uryd|D cg c]  }|j                          c}i}t        j                         }|j                  j                  }| j                  |j                  |j                  |j                  |j                  |j                   |j"                  t$        j&                  j(                  |             d{    d| _         yc c}w 7 w)a  |coro|
        Responds to this interaction by sending the autocomplete choices.

        Parameters
        ----------
        choices: List[:class:`OptionChoice`]
            A list of choices.

        Raises
        ------
        HTTPException
            Sending the result failed.
        InteractionResponded
            This interaction has already been responded to before.
        Nchoicesr   r   r   r=   rA   T)r   r   r   r=   r   auto_completer   r    rq   rS   r^   r   r   r<   rG   rT   r   r   r   auto_complete_resultr   )rb   r*  r   cr   r   r^   s          rd   send_autocomplete_resultz,InteractionResponse.send_autocomplete_result~  s     ( ??&t||44;;o;;;G<qqyy{<=##%}}!!##//		jj??,AAGG 0 

 
	
 
	
 ! =
	
s   ADD)B"DDDc                |  K   | j                   rt        | j                        | j                  }|j                         }t	        j
                         }|j                  j                  }| j                  |j                  |j                  |j                  |j                  |j                  |j                  t        j                   j"                  |             d{    d| _         | j                  j                  j%                  || j                  j&                  j                         | j                  S 7 [w)a  |coro|
        Responds to this interaction by sending a modal dialog.
        This cannot be used to respond to another modal dialog submission.

        Parameters
        ----------
        modal: :class:`discord.ui.Modal`
            The modal dialog to display to the user.

        Raises
        ------
        HTTPException
            Sending the modal failed.
        InteractionResponded
            This interaction has already been responded to before.
        r+  NT)r   r   r   r   r    rq   rS   r^   r   r   r<   rG   rT   r   r   r   modalr   store_modalrD   )rb   r1  r   r   r   r^   s         rd   
send_modalzInteractionResponse.send_modal  s     " ??&t||44--/##%}}!!##//		jj??,2288 0 

 
	
 
	
 ''t||/@/@/C/CD||
	
s   CD<D:AD<z%a button with type ButtonType.premiumz2.6c           
       K   | j                   rt        | j                        | j                  }t        j                         }|j
                  j                  }| j                  |j                  |j                  |j                  |j                  |j                  |j                  t        j                  j                                d{    d| _         | j                  S 7 w)a  |coro|

        Responds to this interaction by sending a premium required message.

        .. deprecated:: 2.6

            A button with type :attr:`ButtonType.premium` should be used instead.

        Raises
        ------
        HTTPException
            Sending the message failed.
        InteractionResponded
            This interaction has already been responded to before.
        r  NT)r   r   r   r    rq   rS   r^   r   r   r<   rG   rT   r   r   r   premium_requiredr   r  s       rd   r5  z$InteractionResponse.premium_required  s     " ??&t||44##%}}!!##//		jj??,==CC 0 	
 		
 		
 ||		
s   CC'C%C'c                
  K   | j                   4 d{    | j                         r%|j                          t        | j                        | d{    ddd      d{    y7 T7 7 	# 1 d{  7  sw Y   yxY ww)a@  |coro|

        Wraps a response and makes sure that it's locked while executing.

        Parameters
        ----------
        coro: Coroutine[Any]
            The coroutine to wrap.

        Raises
        ------
        InteractionResponded
            This interaction has already been responded to before.
        N)r   r   r  r   r   )rb   coros     rd   r   z$InteractionResponse._locked_response  sn      && 	 	||~

*4<<88JJ		 	 	 		 	 	 	sV   BA(B;A.A*A.B"A,#B*A.,B.B 4A75B <B)r   r"   r   )r   r   r   r   r   r   )r   r   r]   )r   
Any | Noner   r2   r   r   r   r9   r  r   r   r   r   r3   r   r   r   r   r  r4   r   floatr   r"   )r   r8  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   bool | Noner   r   r   r   )r*  zlist[OptionChoice]r   r   )r1  r8   r   r"   )r   r"   )r7  zCoroutine[Any, Any, Any]r   r   )r   r   r   r   r[   r   re   r   r  r  r   r:   r   r/  r3  r	   r   r5  r   r   rf   rd   r$   r$     s   "I -
 05 K#Z#F #_ ",0 "__ 	_
 _ _ _ _ *_ _ _ _ _ 
_H &%%#(/#%) '37^L ^L 	^L
 ^L ^L ^L &^L ^L #^L ^L 1^L 
^L@, $, 
	,\&P U=uE" F"Hrf   r$   c                  @    e Zd ZdZd	dZd Zd Zd Zed        Z	d Z
y)
r   )r   _interactionc                     || _         || _        y r]   )r<  r   )rb   rv   r   s      rd   re   z!_InteractionMessageState.__init__  s    )4(.rf   c                8    | j                   j                  |      S r]   )r   rs   )rb   r>   s     rd   rs   z#_InteractionMessageState._get_guild  s    ||&&x00rf   c                8    | j                   j                  |      S r]   )r   
store_userrb   rA   s     rd   r@  z#_InteractionMessageState.store_user  s    ||&&t,,rf   c                8    | j                   j                  |      S r]   )r   create_userrA  s     rd   rC  z$_InteractionMessageState.create_user  s    ||''--rf   c                .    | j                   j                  S r]   )r   r^   r   s    rd   r^   z_InteractionMessageState.http  s    ||   rf   c                .    t        | j                  |      S r]   )getattrr   )rb   attrs     rd   __getattr__z$_InteractionMessageState.__getattr__#  s    t||T**rf   N)rv   r"   r   r5   )r   r   r   r[   re   rs   r@  rC  r   r^   rH  r   rf   rd   r   r     s4    +I/1-. ! !+rf   r   c            
      v    e Zd ZU dZdZded<   eeeeeeeddef
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	dZddd
dZy)r#   ag  Represents the original interaction response message.

    This allows you to edit or delete the message associated with
    the interaction response. To retrieve this object see :meth:`Interaction.original_response`.

    This inherits from :class:`discord.Message` with changes to
    :meth:`edit` and :meth:`delete` to work.

    .. versionadded:: 2.0
    r   r   rS   Nc                   K   |t         u r| j                  xs t         }|
t         u r| j                  j                  }
| j                  j
                  j                  |||||||||	|

       d{   S 7 w)a  |coro|

        Edits the message.

        Parameters
        ----------
        content: Optional[:class:`str`]
            The content to edit the message with or ``None`` to clear it.
        embeds: List[:class:`Embed`]
            A list of embeds to edit the message with.
        embed: Optional[:class:`Embed`]
            The embed to edit the message with. ``None`` suppresses the embeds.
            This should not be mixed with the ``embeds`` parameter.
        file: :class:`File`
            The file to upload. This cannot be mixed with ``files`` parameter.
        files: List[:class:`File`]
            A list of files to send with the content. This cannot be mixed with the
            ``file`` parameter.
        attachments: List[:class:`Attachment`]
            A list of attachments to keep in the message. If ``[]`` is passed
            then all attachments are removed.
        allowed_mentions: :class:`AllowedMentions`
            Controls the mentions being processed in this message.
            See :meth:`.abc.Messageable.send` for more information.
        view: Optional[:class:`~discord.ui.View`]
            The updated view to update this message with. If ``None`` is passed then
            the view is removed.
        delete_after: Optional[:class:`float`]
            If provided, the number of seconds to wait in the background
            before deleting the message we just edited. If the deletion fails,
            then it is silently ignored.
        suppress: Optional[:class:`bool`]
            Whether to suppress embeds for the message.

        Returns
        -------
        :class:`InteractionMessage`
            The newly edited message.

        Raises
        ------
        HTTPException
            Editing the message failed.
        Forbidden
            Edited a message that is not yours.
        TypeError
            You specified both ``embed`` and ``embeds`` or ``file`` and ``files``
        ValueError
            The length of ``embeds`` was invalid.
        r   N)r:   r   r   r$  rS   r<  r   )rb   r   r   r   r   r   r   r   r   r   r   s              rd   r   zInteractionMessage.edit6  s     ~ '!**5gKwzz11H[[--DD#-% E 
 
 	
 
s   A-A6/A40A6r   c               l   K   | j                   j                  j                  |       d{    y7 w)a  |coro|

        Deletes the message.

        Parameters
        ----------
        delay: Optional[:class:`float`]
            If provided, the number of seconds to wait before deleting the message.
            The waiting is done in the background and deletion failures are ignored.

        Raises
        ------
        Forbidden
            You do not have proper permissions to delete the message.
        NotFound
            The message was deleted already.
        HTTPException
            Deleting the message failed.
        r   N)rS   r<  r   )rb   r   s     rd   deletezInteractionMessage.delete  s)     ( kk&&??e?LLLs   *424)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[   r   r:   r   rL  r   rf   rd   r#   r#   '  s    	 I$$ &%%#(/#37%) 'N
N
 N
 	N

 N
 N
 &N
 N
 1N
 #N
 N
 
N
` 59 Mrf   r#   c                  (    e Zd ZU dZdZded<   ddZy)r%   a  Represents a Discord message interaction.

    This is sent on the message object when the message is a response
    to an interaction without an existing message e.g. application command.

    .. versionadded:: 2.0

    .. deprecated:: 2.6

        See :class:`InteractionMetadata`.

    .. note::
        Responses to message components do not include this property.

    Attributes
    ----------
    id: :class:`int`
        The interaction's ID.
    type: :class:`InteractionType`
        The interaction type.
    name: :class:`str`
        The name of the invoked application command.
    user: :class:`User`
        The user that sent the interaction.
    data: :class:`dict`
        The raw interaction data.
    )r<   r=   namerD   rA   rS   rZ   r[   c                   || _         || _        t        |d         | _        |d   | _        |d   | _        | j                   j                  |d         | _        y )Nr<   r=   rN  rD   )rS   rA   rp   r<   r=   rN  r@  rD   ra   s      rd   re   zMessageInteraction.__init__  sO    	4:%)&\	f	++00f>	rf   N)rA   MessageInteractionPayloadrc   r5   )r   r   r   r   r[   r   re   r   rf   rd   r%   r%     s    8 "RIQ?rf   r%   c                      e Zd ZU dZdZded<   ddZd Z ej                  d      dd       Z
 ej                  d	      dd
       Zy)r&   aT  Represents metadata about an interaction.

    This is sent on the message object when the message is related to an interaction

    .. versionadded:: 2.6

    Attributes
    ----------
    id: :class:`int`
        The interaction's ID.
    type: :class:`InteractionType`
        The interaction type.
    user: :class:`User`
        The user that sent the interaction.
    authorizing_integration_owners: :class:`AuthorizingIntegrationOwners`
        The authorizing user or server for the installation(s) relevant to the interaction.
    original_response_message_id: Optional[:class:`int`]
        The ID of the original response message. Only present on interaction follow-up messages.
    interacted_message_id: Optional[:class:`int`]
        The ID of the message that triggered the interaction. Only present on interactions of type
        :attr:`InteractionType.component`.
    triggering_interaction_metadata: Optional[:class:`InteractionMetadata`]
        The metadata of the interaction that opened the model. Only present on interactions of type
        :attr:`InteractionType.modal_submit`.
    )
r<   r=   rD   rL   original_response_message_idinteracted_message_idtriggering_interaction_metadatarS   _cs_original_response_message_cs_interacted_messagerZ   r[   c                  || _         t        |d         | _        t        t        |d         | _        t        ||d         | _        t        |d   |      | _	        t        j                  |d      | _        t        j                  |d      | _        d | _        |j                  d      x}rt!        ||	      | _        y y )
Nr<   r=   rD   rm   rL   rR  rS  rT  ri   )rS   rp   r<   r   r   r=   r   rD   r'   rL   r	   rr   rR  rS  rT  rq   r&   )rb   rA   rc   tims       rd   re   zInteractionMetadata.__init__  s    4:%-otF|%L	Uf>	(.N)OQVW 	+ 9>8O8O09
) 271H1H)2
" LP,((<==3=3F4D0 >rf   c                V    d| j                    d| j                  d| j                  dS )Nz<InteractionMetadata id=z type=z user=>)r<   r=   rD   r   s    rd   __repr__zInteractionMetadata.__repr__  s,    &twwivdii]&UVW	
rf   rU  c                f    | j                   sy| j                  j                  | j                         S )zOptional[:class:`Message`]: The original response message.
        Returns ``None`` if the message is not in cache, or if :attr:`original_response_message_id` is ``None``.
        N)rR  rS   _get_messager   s    rd   original_response_messagez-InteractionMetadata.original_response_message  s+    
 00{{''(I(IJJrf   rV  c                f    | j                   sy| j                  j                  | j                         S )zOptional[:class:`Message`]: The message that triggered the interaction.
        Returns ``None`` if the message is not in cache, or if :attr:`interacted_message_id` is ``None``.
        N)rS  rS   r]  r   s    rd   interacted_messagez&InteractionMetadata.interacted_message  s+    
 )){{''(B(BCCrf   N)rA   InteractionMetadataPayloadrc   r5   )r   zMessage | None)r   r   r   r   r[   r   re   r[  r	   r   r^  r`  r   rf   rd   r&   r&     sh    4"I (

  U ?@K AK  U 89D :Drf   r&   c                      e Zd ZdZdZddZd Zd Zd Z e	j                  d      dd       Z e	j                  d	      dd
       Zy)r'   a  Contains details on the authorizing user or server for the installation(s) relevant to the interaction.

    .. versionadded:: 2.6

    Attributes
    ----------
    user_id: :class:`int` | None
        The ID of the user that authorized the integration.
    guild_id: :class:`int` | None
        The ID of the guild that authorized the integration.
        This will be ``0`` if the integration was triggered
        from the user in the bot's DMs.
    )user_idr>   rS   _cs_user	_cs_guildc                    || _         |j                  d      x}t        |      nd | _        |j                  dd       x}t        |      | _        y d | _        y )N10)rS   rq   rp   rc  r>   )rb   rA   rc   uidr>   s        rd   re   z%AuthorizingIntegrationOwners.__init__*  sU    +/88C=$8C#Es3x4*.((3*==hJCM 	PT 	rf   c                <    d| j                    d| j                   dS )Nz&<AuthorizingIntegrationOwners user_id=z
 guild_id=rZ  )rc  r>   r   s    rd   r[  z%AuthorizingIntegrationOwners.__repr__2  s#    7~ZPTP]P]^_``rf   c                    t        |t              xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r]   )rt   r'   rc  r>   rb   others     rd   __eq__z#AuthorizingIntegrationOwners.__eq__5  s<    u:; 0-0/	
rf   c                &    | j                  |       S r]   )rn  rl  s     rd   __ne__z#AuthorizingIntegrationOwners.__ne__<  s    ;;u%%%rf   rd  c                f    | j                   sy| j                  j                  | j                         S )zOptional[:class:`User`]: The user that authorized the integration.
        Returns ``None`` if the user is not in cache, or if :attr:`user_id` is ``None``.
        N)rc  rS   get_userr   s    rd   rD   z!AuthorizingIntegrationOwners.user?  s'    
 ||{{##DLL11rf   re  c                f    | j                   sy| j                  j                  | j                         S )zOptional[:class:`Guild`]: The guild that authorized the integration.
        Returns ``None`` if the guild is not in cache, or if :attr:`guild_id` is ``0`` or ``None``.
        N)r>   rS   rs   r   s    rd   rj   z"AuthorizingIntegrationOwners.guildH  s'    
 }}{{%%dmm44rf   N)rA   r   rc   r5   )r   zUser | Noner   )r   r   r   r   r[   re   r[  rn  rp  r	   r   rD   rj   r   rf   rd   r'   r'     sf     KI
a
&  U
+2 ,2  U,5 -5rf   r'   )[r   
__future__r   r   typingr   r   r   r    r	   r?   r
   r   r   enumsr   r   r   r   errorsr   r   r   r   r   r   r   rj   r   rk   r   rC   r   r   monetizationr   objectr   rl   r   rD   r   webhook.async_r   r   r    r!   __all__aiohttpr(   r)   r*   r+   r,   r-   r.   r/   r   r0   commandsr1   r   r2   mentionsr3   r  r4   rc   r5   threadsr6   types.interactionsr"   r   r7   r&   ra  r%   rP  ui.modalr8   ui.viewr9   InteractionChannelr:   r   r$   r   r#   r'   r   rf   rd   <module>r     s4  2 #  7 7  O O  K J     ( %  $   %   &)&E3US	
 }} H	 H	VW	 W	t+ +0sM sMl%? %?PQD QDh65 65rf   