
    i                    z   U d Z ddlmZ ddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddl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, ddl-m.Z. ddl/m0Z0m1Z1m2Z2m3Z3 erddl4m5Z5m6Z6 ddl7Zddl8m9Z9 ddl:m;Z; ddl<m=Z=m>Z> ddl?m@Z@mAZAmBZBmCZCmDZDmEZE ddl"mFZF ddl/mGZGmDZDmHZHmIZImJZJ ddlKmLZL ddlMmNZN eeeO         eOf         ZPeEeAe9gePf         ZQeePeQeA         f         ZR G d deLd          ZS G d deNeS          ZTdZU ed           ZV ed!d"#          ZW e
jX        eY          ZZd9d*Z[d:d.Z\ G d/ d0          Z] e]            Z^d1e_d2<    G d3 d4e#d                   Z` G d5 d6e`eja                  Zb G d7 d8e`ejc                  ZddS );a:  
The MIT License (MIT)

Copyright (c) 2015-present Rapptz

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)AnyCallableMappingListDictTYPE_CHECKINGOptionalSequenceTypeVarTypeUnionIterable
Collectionoverload)app_commands)_retrieve_guild_ids)MISSING_is_submodule   )
GroupMixin)
StringView)Context)errors)HelpCommandDefaultHelpCommand)Cog)hybrid_commandhybrid_groupHybridCommandHybridGroup)SelfUnpack)Message)Interaction)User	Snowflake)_BotBotT	UserCheckCoroFuncContextTMaybeAwaitableFunc)Command)CommandCallbackr,   P_HybridCommandDecoratorKwargs_HybridGroupDecoratorKwargs)_ClientOptions)_AutoShardedClientOptionsc                  8    e Zd ZU ded<   ded<   ded<   ded<   dS )	_BotOptionszOptional[int]owner_idzOptional[Collection[int]]	owner_idsboolstrip_after_prefixcase_insensitiveN)__name__
__module____qualname____annotations__     Y/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/discord/ext/commands/bot.pyr6   r6   [   sB         ,,,,    rA   r6   F)totalc                      e Zd ZdS )_AutoShardedBotOptionsN)r<   r=   r>   r@   rA   rB   rE   rE   a   s          rA   rE   )when_mentionedwhen_mentioned_orBotAutoShardedBotTCFTr+   )boundbotr(   msgr$   return	List[str]c               B    d| j         j         dd| j         j         dgS )a  A callable that implements a command prefix equivalent to being mentioned.

    These are meant to be passed into the :attr:`.Bot.command_prefix` attribute.

        .. versionchanged:: 2.0

            ``bot`` and ``msg`` parameters are now positional-only.
    z<@z> z<@!)userid)rM   rN   s     rB   rF   rF   q   s.     !   "7"7"7"788rA   prefixesstr$Callable[[_Bot, Message], List[str]]c                       fd}|S )a  A callable that implements when mentioned or other prefixes provided.

    These are meant to be passed into the :attr:`.Bot.command_prefix` attribute.

    Example
    --------

    .. code-block:: python3

        bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'))


    .. note::

        This callable returns another callable, so if this is done inside a custom
        callable, you must call the returned callable, for example:

        .. code-block:: python3

            async def get_prefix(bot, message):
                extras = await prefixes_for(message.guild) # returns a list
                return commands.when_mentioned_or(*extras)(bot, message)


    See Also
    ----------
    :func:`.when_mentioned`
    c                L    t                    }t          | |          |z   }|S N)listrF   )rM   rN   rrT   s      rB   innerz when_mentioned_or.<locals>.inner   s'    NN3$$q(rA   r@   )rT   r\   s   ` rB   rG   rG   ~   s#    <    
 LrA   c                      e Zd Zd ZdS )_DefaultReprc                    dS )Nz<default-help-command>r@   selfs    rB   __repr__z_DefaultRepr.__repr__   s    ''rA   N)r<   r=   r>   rb   r@   rA   rB   r^   r^      s#        ( ( ( ( (rA   r^   r   _defaultc                  J    e Zd Zeej        deedd fdZd fdZd fdZ	e
j                            e
j        j                  d fd            Ze
j                            ej                  d fd             Ze
j                            ej                  d fd#            Zed$fdd*Zed$fdd-Zdd2Zdd5Zd6d7dd:Zd6d7dd;Zdd=Zd6d7dd?ZddBZddDZddEZefddGZefddHZefddJZd6eedKddSZ ddUZ!eedVddWZ"e#ddY            Z$ddZZ%dd^Z&ddaZ'ddcZ(dddddeZ)dddddfZ*dddddgZ+e#ddi            Z,e#ddj            Z-e-j.        ddl            Z-e#ddn            Z/ddrZ0e1ddv            Z2e1ddz            Z2ed{dd|Z2dd}Z3dd~Z4ddZ5 xZ6S )BotBaseNhelp_commandtree_clsdescriptionallowed_contextsallowed_installscommand_prefixPrefixType[BotT]rg   Optional[HelpCommand]rh   #Type[app_commands.CommandTree[Any]]ri   Optional[str]rj   app_commands.AppCommandContextrk    app_commands.AppInstallationTypeintentsdiscord.IntentsoptionsUnpack[_BotOptions]rO   Nonec               >    t                      j        d	d|i| || _        i | _         ||           | _        |t
          ur|| j        _        |t
          ur|| j        _        i | _        i | _	        g | _
        g | _        d | _        d | _        d | _        |rt          j        |          nd| _        |                    d          | _        |                    dt)                                | _        |                    dd          | _        | j        r| j        rt/          d          | j        rEt1          | j        t2          j        j                  s!t/          d| j        j        j                   |t<          u rt?                      | _         d S || _         d S )
Nrs    r7   r8   r:   Fz$Both owner_id and owner_ids are set.z#owner_ids must be a collection not r@   )!super__init__rl   extra_events_BotBase__treer   rj   rk   _BotBase__cogs_BotBase__extensions_checks_check_once_before_invoke_after_invoke_help_commandinspectcleandocri   getr7   setr8   r:   	TypeError
isinstancecollectionsabcr   	__class__r<   rc   r   rg   )
ra   rl   rg   rh   ri   rj   rk   rs   ru   r   s
            rB   r{   zBotBase.__init__   s    	444G4440>796>htnn7**+;DK(7**+;DK(&(9;(*,.261548AL T 0 = = =RT'.{{:'>'>4;KKSUU4S4S(/4H%(P(P= 	DT^ 	DBCCC> 	g*T^[_=W"X"X 	ge$.BZBceefff8## 2 4 4D ,DrA   c                  K   t                                                       d {V  | j        }| j        j        st          |          r	|t          upSt          |t                    p>t          |t          j
        j                  ot          t          |                    dk    }|rt                              d           d S d S d S )Nr   zPPrivileged message content intent is missing, commands may not work as expected.)rz   _async_setup_hookrl   rs   message_contentcallablerF   r   rU   r   r   r   lenrZ   _logwarning)ra   prefixtrigger_warningr   s      rB   r   zBotBase._async_setup_hook   s      gg'')))))))))$
 |+ 	q&!!BfN&B ]fc**]v{'?@@[SfEVEVZ[E[ 
  qoppppp	q 	qq qrA   
event_namerU   argsr   kwargsc                    t                      j        |g|R i | d|z   }| j                            |g           D ]} | j        ||g|R i | d S )Non_)rz   dispatchr|   r   _schedule_event)ra   r   r   r   eveventr   s         rB   r   zBotBase.dispatch   s    5d555f555Z&**2r22 	= 	=E D <T<<<V<<<<	= 	=rA   c                d  K   t          | j                  D ].}	 |                     |           d {V  # t          $ r Y +w xY wt          | j                  D ].}	 |                     |           d {V  # t          $ r Y +w xY wt                                                       d {V  d S rY   )tupler   unload_extension	Exceptionr~   
remove_cogrz   close)ra   	extensioncogr   s      rB   r   zBotBase.close   s     t011 	 	I++I6666666666    %% 	 	Cooc**********    ggmmoos!   7
AAA::
BBcommandCommand[Any, ..., Any]c                   t                                          |           t          |t          t          f          r;|j        r6|j        |j        j        s%| j                            |j                   d S d S d S d S rY   )	rz   add_commandr   r    r!   app_commandr   __cog_is_app_commands_group__tree)ra   r   r   s     rB   r   zBotBase.add_command  s    G$$$g{;<< 	;AT 	;
 {"'+*S"	%%g&9:::::	; 	; 	; 	;
 #"rA   name Optional[Command[Any, ..., Any]]c               t   t                                          |          }t          |t          t          f          ry|j        rr|j        |j        j        r|S |j        j        }|| j	                            |           n4|D ]1}| j	                            |t          j        |                     2|S )N)rS   guild)rz   remove_commandr   r    r!   r   r   r   
_guild_idsr}   discordObject)ra   r   cmd	guild_idsguild_idr   s        rB   r   zBotBase.remove_command  s    050F0Ft0L0LcM;788 
	XS_ 
	Xw"sw'L"
-0_-GI **40000 ) X XHK..t7>X;V;V;V.WWWW
rA   T#Union[str, app_commands.locale_str]with_app_commandr9   %Unpack[_HybridCommandDecoratorKwargs]JCallable[[CommandCallback[Any, ContextT, P, T]], HybridCommand[Any, P, T]]c                $     d fd}|S )a`  A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_command` and adds it to
        the internal command list via :meth:`add_command`.

        Returns
        --------
        Callable[..., :class:`HybridCommand`]
            A decorator that converts the provided method into a Command, adds it to the bot, then returns it.
        func$CommandCallback[Any, ContextT, P, T]c                                         d            t          d|           }                    |           |S Nparent)r   r   )
setdefaultr   r   r   resultr   r   r   ra   r   s     rB   	decoratorz)BotBase.hybrid_command.<locals>.decorator2  sX    h---b^GWbb[abbcghhFV$$$MrA   r   r   r@   ra   r   r   r   r   r   s   ````` rB   r   zBotBase.hybrid_command"  A     	 	 	 	 	 	 	 	 	 	 rA   #Unpack[_HybridGroupDecoratorKwargs]HCallable[[CommandCallback[Any, ContextT, P, T]], HybridGroup[Any, P, T]]c                $     d fd}|S )aZ  A shortcut decorator that invokes :func:`~discord.ext.commands.hybrid_group` and adds it to
        the internal command list via :meth:`add_command`.

        Returns
        --------
        Callable[..., :class:`HybridGroup`]
            A decorator that converts the provided method into a Group, adds it to the bot, then returns it.
        r   r   c                                         d            t          d|           }                    |           |S r   )r   r   r   r   s     rB   r   z'BotBase.hybrid_group.<locals>.decoratorJ  sX    h---`\dtEU``Y_``aeffFV$$$MrA   r   r@   r   s   ````` rB   r   zBotBase.hybrid_group:  r   rA   contextContext[BotT]	exceptionerrors.CommandErrorc                  K   | j                             dd          rdS |j        }|r|                                rdS |j        }|r|                                rdS t
                              d||           dS )a  |coro|

        The default command error handler provided by the bot.

        By default this logs to the library logger, however it could be
        overridden to have a different implementation.

        This only fires if you do not specify any listeners for command error.

        .. versionchanged:: 2.0

            ``context`` and ``exception`` parameters are now positional-only.
            Instead of writing to ``sys.stderr`` this now uses the library logger.
        on_command_errorNz Ignoring exception in command %s)exc_info)r|   r   r   has_error_handlerr   r   error)ra   r   r   r   r   s        rB   r   zBotBase.on_command_errorT  s         !3T:: 	F/ 	w0022 	Fk 	3((** 	F

5w
SSSSSrA   r   rJ   c               0    |                      |           |S )aH  A decorator that adds a global check to the bot.

        A global check is similar to a :func:`.check` that is applied
        on a per command basis except it is run before any command checks
        have been verified and applies to every command the bot has.

        .. note::

            This function can either be a regular function or a coroutine.

        Similar to a command :func:`.check`\, this takes a single parameter
        of type :class:`.Context` and can only raise exceptions inherited from
        :exc:`.CommandError`.

        Example
        ---------

        .. code-block:: python3

            @bot.check
            def check_commands(ctx):
                return ctx.command.qualified_name in allowed_commands

        .. versionchanged:: 2.0

            ``func`` parameter is now positional-only.
        	add_checkra   r   s     rB   checkzBotBase.checkr  s    : 	trA   F	call_onceUserCheck[ContextT]r   c              v    |r| j                             |           dS | j                            |           dS )a  Adds a global check to the bot.

        This is the non-decorator interface to :meth:`.check`
        and :meth:`.check_once`.

        .. versionchanged:: 2.0

            ``func`` parameter is now positional-only.

        .. seealso:: The :func:`~discord.ext.commands.check` decorator

        Parameters
        -----------
        func
            The function that was used as a global check.
        call_once: :class:`bool`
            If the function should only be called once per
            :meth:`.invoke` call.
        N)r   appendr   )ra   r   r   s      rB   r   zBotBase.add_check  sE    *  	&##D)))))L%%%%%rA   c              t    |r| j         n| j        }	 |                    |           dS # t          $ r Y dS w xY w)a  Removes a global check from the bot.

        This function is idempotent and will not raise an exception
        if the function is not in the global checks.

        .. versionchanged:: 2.0

            ``func`` parameter is now positional-only.

        Parameters
        -----------
        func
            The function to remove from the global checks.
        call_once: :class:`bool`
            If the function was added with ``call_once=True`` in
            the :meth:`.Bot.add_check` call or using :meth:`.check_once`.
        N)r   r   remove
ValueError)ra   r   r   ls       rB   remove_checkzBotBase.remove_check  sR    $ !*;Dt|	HHTNNNNN 	 	 	DD	s   ) 
77rK   c               4    |                      |d           |S )a  A decorator that adds a "call once" global check to the bot.

        Unlike regular global checks, this one is called only once
        per :meth:`.invoke` call.

        Regular global checks are called whenever a command is called
        or :meth:`.Command.can_run` is called. This type of check
        bypasses that and ensures that it's called only once, even inside
        the default help command.

        .. note::

            When using this function the :class:`.Context` sent to a group subcommand
            may only parse the parent command and not the subcommands due to it
            being invoked once per :meth:`.Bot.invoke` call.

        .. note::

            This function can either be a regular function or a coroutine.

        Similar to a command :func:`.check`\, this takes a single parameter
        of type :class:`.Context` and can only raise exceptions inherited from
        :exc:`.CommandError`.

        Example
        ---------

        .. code-block:: python3

            @bot.check_once
            def whitelist(ctx):
                return ctx.message.author.id in my_whitelist

        .. versionchanged:: 2.0

            ``func`` parameter is now positional-only.

        Tr   r   r   s     rB   
check_oncezBotBase.check_once  s     N 	tt,,,rA   ctxc                 K   |r| j         n| j        }t          |          dk    rdS t          j                            fd|D                        d {V S )Nr   Tc              3  .   K   | ]} |          V  d S rY   r@   ).0fr   s     rB   	<genexpr>z"BotBase.can_run.<locals>.<genexpr>  s+      ,B,BQQsVV,B,B,B,B,B,BrA   )r   r   r   r   utils	async_all)ra   r   r   datas    `  rB   can_runzBotBase.can_run  sl      #,>t$,t99>>4],,,B,B,B,BT,B,B,BBBBBBBBBBrA   rR   r&   c               (  K   | j         r|j        | j         k    S | j        r|j        | j        v S |                                  d{V }|j        r&d |j        j        D             x| _        }|j        |v S |j        j        x| _         }|j        |k    S )a  |coro|

        Checks if a :class:`~discord.User` or :class:`~discord.Member` is the owner of
        this bot.

        If an :attr:`owner_id` is not set, it is fetched automatically
        through the use of :meth:`~.Bot.application_info`.

        .. versionchanged:: 1.3
            The function also checks if the application is team-owned if
            :attr:`owner_ids` is not set.

        .. versionchanged:: 2.0

            ``user`` parameter is now positional-only.

        .. versionchanged:: 2.4

            This function now respects the team member roles if the bot is team-owned.
            In order to be considered an owner, they must be either an admin or
            a developer.

        Parameters
        -----------
        user: :class:`.abc.User`
            The user to check for.

        Returns
        --------
        :class:`bool`
            Whether the user is the owner.
        Nc                n    h | ]2}|j         t          j        j        t          j        j        fv +|j        3S r@   )roler   TeamMemberRoleadmin	developerrS   )r   ms     rB   	<setcomp>z#BotBase.is_owner.<locals>.<setcomp>   sB     ( ( (v'"8">@V@`!aaa DaaarA   )r7   rS   r8   application_infoteammembersowner)ra   rR   appidsr7   s        rB   is_ownerzBotBase.is_owner  s      D = 	+7dm++^ 	+7dn,,)-)>)>)@)@#@#@#@#@#@#@Cx 	+( ( X-( ( ( 
 w#~%+.9<7w(**rA   coroc               Z    t          j        |          st          d          || _        |S )a  A decorator that registers a coroutine as a pre-invoke hook.

        A pre-invoke hook is called directly before the command is
        called. This makes it a useful function to set up database
        connections or any type of set up required.

        This pre-invoke hook takes a sole parameter, a :class:`.Context`.

        .. note::

            The :meth:`~.Bot.before_invoke` and :meth:`~.Bot.after_invoke` hooks are
            only called if all checks and argument parsing procedures pass
            without error. If any check or argument parsing procedures fail
            then the hooks are not called.

        .. versionchanged:: 2.0

            ``coro`` parameter is now positional-only.

        Parameters
        -----------
        coro: :ref:`coroutine <coroutine>`
            The coroutine to register as the pre-invoke hook.

        Raises
        -------
        TypeError
            The coroutine passed is not actually a coroutine.
        z(The pre-invoke hook must be a coroutine.)asyncioiscoroutinefunctionr   r   ra   r  s     rB   before_invokezBotBase.before_invoke*  s4    < *400 	HFGGG"rA   c               Z    t          j        |          st          d          || _        |S )a%  A decorator that registers a coroutine as a post-invoke hook.

        A post-invoke hook is called directly after the command is
        called. This makes it a useful function to clean-up database
        connections or any type of clean up required.

        This post-invoke hook takes a sole parameter, a :class:`.Context`.

        .. note::

            Similar to :meth:`~.Bot.before_invoke`\, this is not called unless
            checks and argument parsing procedures succeed. This hook is,
            however, **always** called regardless of the internal command
            callback raising an error (i.e. :exc:`.CommandInvokeError`\).
            This makes it ideal for clean-up scenarios.

        .. versionchanged:: 2.0

            ``coro`` parameter is now positional-only.

        Parameters
        -----------
        coro: :ref:`coroutine <coroutine>`
            The coroutine to register as the post-invoke hook.

        Raises
        -------
        TypeError
            The coroutine passed is not actually a coroutine.
        z)The post-invoke hook must be a coroutine.)r  r  r   r   r  s     rB   after_invokezBotBase.after_invokeN  s4    > *400 	IGHHH!rA   r+   c                   |t           u r|j        n|}t          j        |          st	          d          || j        v r"| j        |                             |           dS |g| j        |<   dS )an  The non decorator alternative to :meth:`.listen`.

        .. versionchanged:: 2.0

            ``func`` parameter is now positional-only.

        Parameters
        -----------
        func: :ref:`coroutine <coroutine>`
            The function to call.
        name: :class:`str`
            The name of the event to listen for. Defaults to ``func.__name__``.

        Example
        --------

        .. code-block:: python3

            async def on_ready(): pass
            async def my_message(message): pass

            bot.add_listener(on_ready)
            bot.add_listener(my_message, 'on_message')

        zListeners must be coroutinesN)r   r<   r  r  r   r|   r   ra   r   r   s      rB   add_listenerzBotBase.add_listeneru  s~    4 !%t}}T*400 	<:;;;4$$$d#**400000'+fDd###rA   c                   |t           u r|j        n|}|| j        v r4	 | j        |                             |           dS # t          $ r Y dS w xY wdS )a  Removes a listener from the pool of listeners.

        .. versionchanged:: 2.0

            ``func`` parameter is now positional-only.

        Parameters
        -----------
        func
            The function that was used as a listener to remove.
        name: :class:`str`
            The name of the event we want to remove. Defaults to
            ``func.__name__``.
        N)r   r<   r|   r   r   r  s      rB   remove_listenerzBotBase.remove_listener  sv      !%t}}T4$$$!$'..t44444    %$s    ? 
AACallable[[CFT], CFT]c                     d fd}|S )a  A decorator that registers another function as an external
        event listener. Basically this allows you to listen to multiple
        events from different places e.g. such as :func:`.on_ready`

        The functions being listened to must be a :ref:`coroutine <coroutine>`.

        Example
        --------

        .. code-block:: python3

            @bot.listen()
            async def on_message(message):
                print('one')

            # in some other file...

            @bot.listen('on_message')
            async def my_message(message):
                print('two')

        Would print one and two in an unspecified order.

        Raises
        -------
        TypeError
            The function being listened to is not a coroutine.
        r   rK   rO   c                4                         |            | S rY   )r  )r   r   ra   s    rB   r   z!BotBase.listen.<locals>.decorator  s    dD)))KrA   r   rK   rO   rK   r@   )ra   r   r   s   `` rB   listenzBotBase.listen  s/    <	 	 	 	 	 	 	 rA   overrider   guildsr   r   r  r   Optional[Snowflake]r  Sequence[Snowflake]c                K   t          |t                    st          d          |j        }| j                            |          }|8|st          j        d|d          |                     |||           d{V  |j	        r#| j
                            |j	        |||           |                    | |||           d{V }|| j        |<   dS )ay  |coro|

        Adds a "cog" to the bot.

        A cog is a class that has its own event listeners and commands.

        If the cog is a :class:`.app_commands.Group` then it is added to
        the bot's :class:`~discord.app_commands.CommandTree` as well.

        .. note::

            Exceptions raised inside a :class:`.Cog`'s :meth:`~.Cog.cog_load` method will be
            propagated to the caller.

        .. versionchanged:: 2.0

            :exc:`.ClientException` is raised when a cog with the same name
            is already loaded.

        .. versionchanged:: 2.0

            ``cog`` parameter is now positional-only.

        .. versionchanged:: 2.0

            This method is now a :term:`coroutine`.

        Parameters
        -----------
        cog: :class:`.Cog`
            The cog to register to the bot.
        override: :class:`bool`
            If a previously loaded cog with the same name should be ejected
            instead of raising an error.

            .. versionadded:: 2.0
        guild: Optional[:class:`~discord.abc.Snowflake`]
            If the cog is an application command group, then this would be the
            guild where the cog group would be added to. If not given then
            it becomes a global command instead.

            .. versionadded:: 2.0
        guilds: List[:class:`~discord.abc.Snowflake`]
            If the cog is an application command group, then this would be the
            guilds where the cog group would be added to. If not given then
            it becomes a global command instead. Cannot be mixed with
            ``guild``.

            .. versionadded:: 2.0

        Raises
        -------
        TypeError
            The cog does not inherit from :class:`.Cog`.
        CommandError
            An error happened during loading.
        ClientException
            A cog with the same name is already loaded.
        zcogs must derive from CogNz
Cog named z already loadedr   r  r  )r   r   r   __cog_name__r~   r   r   ClientExceptionr   __cog_app_commands_group__r}   r   _inject)ra   r   r  r   r  cog_nameexistings          rB   add_cogzBotBase.add_cog  s     J #s## 	97888#;??8,, X-.V8.V.V.VWWW//(%/GGGGGGGGG) 	sK##C$BX]bkq#rrrKKxuVKTTTTTTTT #HrA   Optional[Cog]c               6    | j                             |          S )aI  Gets the cog instance requested.

        If the cog is not found, ``None`` is returned instead.

        .. versionchanged:: 2.0

            ``name`` parameter is now positional-only.

        Parameters
        -----------
        name: :class:`str`
            The name of the cog you are requesting.
            This is equivalent to the name passed via keyword
            argument in class creation or the class name if unspecified.

        Returns
        --------
        Optional[:class:`Cog`]
            The cog that was requested. If not found, returns ``None``.
        )r~   r   )ra   r   s     rB   get_cogzBotBase.get_cog-  s    * {t$$$rA   r  c                K   | j                             |d          }|dS | j        }|r|j        |u rd|_        t	          |||          }|j        rP|| j                            |           n3|D ]0}| j                            |t          j	        |                     1|
                    | |           d{V  |S )a  |coro|

        Removes a cog from the bot and returns it.

        All registered commands and event listeners that the
        cog has registered will be removed as well.

        If no cog is found then this method has no effect.

        .. versionchanged:: 2.0

            ``name`` parameter is now positional-only.

        .. versionchanged:: 2.0

            This method is now a :term:`coroutine`.

        Parameters
        -----------
        name: :class:`str`
            The name of the cog to remove.
        guild: Optional[:class:`~discord.abc.Snowflake`]
            If the cog is an application command group, then this would be the
            guild where the cog group would be removed from. If not given then
            a global command is removed instead instead.

            .. versionadded:: 2.0
        guilds: List[:class:`~discord.abc.Snowflake`]
            If the cog is an application command group, then this would be the
            guilds where the cog group would be removed from. If not given then
            a global command is removed instead instead. Cannot be mixed with
            ``guild``.

            .. versionadded:: 2.0

        Returns
        -------
        Optional[:class:`.Cog`]
             The cog that was removed. ``None`` if not found.
        Nr   )r   )r~   popr   r   r   r  r}   r   r   r   _eject)ra   r   r   r  r   rg   r   r   s           rB   r   zBotBase.remove_cogD  s      b koodD));F) 	$L,33#L'UF;;	) 	U **40000 ) U UHK..t7>(;S;S.TTTTjjj333333333
rA   Mapping[str, Cog]c                4    t          j        | j                  S )zLMapping[:class:`str`, :class:`Cog`]: A read-only mapping of cog name to cog.)typesMappingProxyTyper~   r`   s    rB   cogszBotBase.cogs  s     %dk222rA   c                0  K   | j                                                                         D ]5\  }}t          ||j                  r|                     |           d {V  6| j                                                                        D ]a}|j        Xt          ||j                  rCt          |t                    r|                                 |                     |j                   b| j                                                                        D ]_}g }t          |          D ]6\  }}|j        *t          ||j                  r|                    |           7t#          |          D ]}||= `| j                            |           d S rY   )r~   copyitemsr   r=   r   all_commandsvaluesmoduler   r   recursively_remove_all_commandsr   r   r|   	enumerater   reversedr}   _remove_with_module)	ra   r   cognamer   r   
event_listr   indexr   s	            rB   _remove_module_referencesz!BotBase._remove_module_references  s      !K,,..4466 	/ 	/LGST3>22 /oog......... $))++2244 	. 	.Cz%-cj*I*I%c:.. :77999##CH--- +002299;; 	& 	&JF )* 5 5 ) )u#/M$HX4Y4Y/MM%(((!&)) & &u%%& 	''-----rA   libtypes.ModuleTypekeyc                  K   	 t          |d          }	  ||            d {V  n # t          $ r Y nw xY w# t          $ r Y nw xY w| j                            |d            t
          j                            |d            |j        }t          t
          j        	                                          D ]}t          ||          rt
          j        |=  d S # | j                            |d            t
          j                            |d            |j        }t          t
          j        	                                          D ]}t          ||          rt
          j        |=  w xY w)Nteardown)getattrr   AttributeErrorr   r'  sysmodulesr<   rZ   keysr   )ra   r<  r>  r   r   r3  s         rB   _call_module_finalizerszBotBase._call_module_finalizers  s     	,3
++Dd4jj             	 	 	D	 !!#t,,,KOOC&&&<Ds{//1122 , , v.. ,F+, , !!#t,,,KOOC&&&<Ds{//1122 , , v.. ,F+,s=   7 ' C 
4C 4C 
AC AC BE%specimportlib.machinery.ModuleSpecc                  K   t           j                            |          }|t          j        |<   	 |j                            |           n5# t          $ r(}t          j        |= t          j	        ||          |d }~ww xY w	 t          |d          }n/# t          $ r" t          j        |= t          j        |          w xY w	  ||            d {V  || j        |<   d S # t          $ rd}t          j        |= |                     |j                   d {V  |                     ||           d {V  t          j	        ||          |d }~ww xY w)Nsetup)	importlibutilmodule_from_specrC  rD  loaderexec_moduler   r   ExtensionFailedrA  rB  NoEntryPointErrorr   r;  r<   rF  )ra   rG  r>  r<  erJ  s         rB   _load_from_module_speczBotBase._load_from_module_spec  s     n--d33C	8K##C(((( 	8 	8 	8C (a00a7	8	0C))EE 	0 	0 	0C *3///	0	)%++ &)Dc"""  	8 	8 	8C 00>>>>>>>>>..sC888888888(a00a7		8s<   A 
A?#A::A?B ,C C! !
E+AE

Epackagec                    	 t           j                            ||          S # t          $ r t	          j        |          w xY wrY   )rK  rL  resolve_nameImportErrorr   ExtensionNotFound)ra   r   rT  s      rB   _resolve_namezBotBase._resolve_name  sK    	1>..tW=== 	1 	1 	1*4000	1s	   " A)rT  c                 K   |                      ||          }|| j        v rt          j        |          t          j                            |          }|t          j        |          |                     ||           d{V  dS )a  |coro|

        Loads an extension.

        An extension is a python module that contains commands, cogs, or
        listeners.

        An extension must have a global function, ``setup`` defined as
        the entry point on what to do when the extension is loaded. This entry
        point must have a single argument, the ``bot``.

        .. versionchanged:: 2.0

            This method is now a :term:`coroutine`.

        Parameters
        ------------
        name: :class:`str`
            The extension name to load. It must be dot separated like
            regular Python imports if accessing a sub-module. e.g.
            ``foo.test`` if you want to import ``foo/test.py``.
        package: Optional[:class:`str`]
            The package name to resolve relative imports with.
            This is required when loading an extension using a relative path, e.g ``.foo.test``.
            Defaults to ``None``.

            .. versionadded:: 1.7

        Raises
        --------
        ExtensionNotFound
            The extension could not be imported.
            This is also raised if the name of the extension could not
            be resolved using the provided ``package`` parameter.
        ExtensionAlreadyLoaded
            The extension is already loaded.
        NoEntryPointError
            The extension does not have a setup function.
        ExtensionFailed
            The extension or its setup function had an execution error.
        N)	rY  r   r   ExtensionAlreadyLoadedrK  rL  	find_specrX  rS  )ra   r   rT  rG  s       rB   load_extensionzBotBase.load_extension  s      V !!$004$$$/555~''--<*4000))$55555555555rA   c                 K   |                      ||          }| j                            |          }|t          j        |          |                     |j                   d{V  |                     ||           d{V  dS )a  |coro|

        Unloads an extension.

        When the extension is unloaded, all commands, listeners, and cogs are
        removed from the bot and the module is un-imported.

        The extension can provide an optional global function, ``teardown``,
        to do miscellaneous clean-up if necessary. This function takes a single
        parameter, the ``bot``, similar to ``setup`` from
        :meth:`~.Bot.load_extension`.

        .. versionchanged:: 2.0

            This method is now a :term:`coroutine`.

        Parameters
        ------------
        name: :class:`str`
            The extension name to unload. It must be dot separated like
            regular Python imports if accessing a sub-module. e.g.
            ``foo.test`` if you want to import ``foo/test.py``.
        package: Optional[:class:`str`]
            The package name to resolve relative imports with.
            This is required when unloading an extension using a relative path, e.g ``.foo.test``.
            Defaults to ``None``.

            .. versionadded:: 1.7

        Raises
        -------
        ExtensionNotFound
            The name of the extension could not
            be resolved using the provided ``package`` parameter.
        ExtensionNotLoaded
            The extension was not loaded.
        N)rY  r   r   r   ExtensionNotLoadedr;  r<   rF  )ra   r   rT  r<  s       rB   r   zBotBase.unload_extension  s      N !!$00##D));+D111,,S\:::::::::**355555555555rA   c               B  K   |                      ||          }| j                            |          t          j        |          fdt
          j                                        D             }	 |                     j	                   d{V  | 
                    |           d{V  |                     |           d{V  dS # t          $ rF                     |            d{V  | j        |<   t
          j                            |            w xY w)ay  |coro|

        Atomically reloads an extension.

        This replaces the extension with the same extension, only refreshed. This is
        equivalent to a :meth:`unload_extension` followed by a :meth:`load_extension`
        except done in an atomic way. That is, if an operation fails mid-reload then
        the bot will roll-back to the prior working state.

        Parameters
        ------------
        name: :class:`str`
            The extension name to reload. It must be dot separated like
            regular Python imports if accessing a sub-module. e.g.
            ``foo.test`` if you want to import ``foo/test.py``.
        package: Optional[:class:`str`]
            The package name to resolve relative imports with.
            This is required when reloading an extension using a relative path, e.g ``.foo.test``.
            Defaults to ``None``.

            .. versionadded:: 1.7

        Raises
        -------
        ExtensionNotLoaded
            The extension was not loaded.
        ExtensionNotFound
            The extension could not be imported.
            This is also raised if the name of the extension could not
            be resolved using the provided ``package`` parameter.
        NoEntryPointError
            The extension does not have a setup function.
        ExtensionFailed
            The extension setup function had an execution error.
        Nc                F    i | ]\  }}t          j        |          ||S r@   )r   r<   )r   r   r3  r<  s      rB   
<dictcomp>z,BotBase.reload_extension.<locals>.<dictcomp>m  sA     
 
 
fS\400
&
 
 
rA   )rY  r   r   r   r_  rC  rD  r0  r;  r<   rF  r]  r   rJ  update)ra   r   rT  rD  r<  s       @rB   reload_extensionzBotBase.reload_extensionA  si     J !!$00##D));+D111
 
 
 
 # 1 1 3 3
 
 
	00>>>>>>>>>..sD999999999%%d+++++++++++ 		 		 		 ))D//!!!!!!!&)Dd# Kw'''		s   5AC ADMapping[str, types.ModuleType]c                4    t          j        | j                  S )zhMapping[:class:`str`, :class:`py:types.ModuleType`]: A read-only mapping of extension name to extension.)r+  r,  r   r`   s    rB   
extensionszBotBase.extensions  s     %d&7888rA   c                    | j         S rY   )r   r`   s    rB   rg   zBotBase.help_command  s    !!rA   valuec                2   |ct          |t                    st          d          | j        | j                            |            || _        |                    |            d S | j        #| j                            |            d | _        d S d | _        d S )Nz.help_command must be a subclass of HelpCommand)r   r   r   r   _remove_from_bot_add_to_bot)ra   ri  s     rB   rg   zBotBase.help_command  s    e[11 R PQQQ!-"33D999!&Dd#####+//555!%D!%DrA   app_commands.CommandTree[Self]c                    | j         S )z:class:`~discord.app_commands.CommandTree`: The command tree responsible for handling the application commands
        in this bot.

        .. versionadded:: 2.0
        )r}   r`   s    rB   r   zBotBase.tree  s     {rA   messager$   Union[List[str], str]c               h  K   | j         x}}t          |          r't          j                            || |           d{V }t          |t                    s[	 t          |          }nJ# t          $ r= t          |t          j
        j                  r t          d|j        j                   w xY w|S )a  |coro|

        Retrieves the prefix the bot is listening to
        with the message as a context.

        .. versionchanged:: 2.0

            ``message`` parameter is now positional-only.

        Parameters
        -----------
        message: :class:`discord.Message`
            The message context to get the prefix of.

        Returns
        --------
        Union[List[:class:`str`], :class:`str`]
            A list of prefixes or a single prefix that the bot is
            listening for.
        Nzecommand_prefix must be plain string, iterable of strings, or callable returning either of these, not )rl   r   r   r   maybe_coroutiner   rU   rZ   r   r   r   r   r   r<   )ra   ro  r   rets       rB   
get_prefixzBotBase.get_prefix  s      * **F 	M55fdGLLLLLLLLC#s## 	3ii 	 	 	 c;?#;<< O69m6LO O  	 
s   A( (AB/originUnion[Message, Interaction]Context[Self]c               
   K   d S rY   r@   )ra   ru  s     rB   get_contextzBotBase.get_context  s       	rA   clsType[ContextT]r,   c              
   K   d S rY   r@   )ra   ru  rz  s      rB   ry  zBotBase.get_context  s       3rA   )rz  c                K   |t           u rt          }t          |t          j                  r|                    |           d{V S t          |j                  } |d|| |          }|j        j	        | j
        j	        k    r|S |                     |           d{V }|}t          |t                    r|                    |          s|S n	 |j                            t          |                    r&t          j                            |j        |          }n|S nv# t$          $ ri t          |t&                    st%          d|j        j                   |D ]3}t          |t                    st%          d|j        j                   4 w xY w| j        r|                                 |                                }||_        ||_        | j                            |          |_        |S )a  |coro|

        Returns the invocation context from the message or interaction.

        This is a more low-level counter-part for :meth:`.process_commands`
        to allow users more fine grained control over the processing.

        The returned context is not guaranteed to be a valid invocation
        context, :attr:`.Context.valid` must be checked to make sure it is.
        If the context is not valid then it is not a valid candidate to be
        invoked under :meth:`~.Bot.invoke`.

        .. note::

            In order for the custom context to be used inside an interaction-based
            context (such as :class:`HybridCommand`) then this method must be
            overridden to return that class.

        .. versionchanged:: 2.0

            ``message`` parameter is now positional-only and renamed to ``origin``.

        Parameters
        -----------
        origin: Union[:class:`discord.Message`, :class:`discord.Interaction`]
            The message or interaction to get the invocation context from.
        cls
            The factory class that will be used to create the context.
            By default, this is :class:`.Context`. Should a custom
            class be provided, it must be similar enough to :class:`.Context`\'s
            interface.

        Returns
        --------
        :class:`.Context`
            The invocation context. The type of this can change via the
            ``cls`` parameter.
        N)r   viewrM   ro  z@get_prefix must return either a string or a list of string, not zXIterable command_prefix or list returned from get_prefix must contain only strings, not )r   r   r   r   r%   from_interactionr   contentauthorrS   rR   rt  rU   skip_string
startswithr   r   findr   rZ   r   r<   r:   skip_wsget_wordinvoked_withr   r1  r   r   )	ra   ru  rz  r~  r   r   invoked_prefixri  invokers	            rB   ry  zBotBase.get_context  s6     Z '>>Cfg122 	6--f555555555&.))cDdFCCC=ty|++Jv........fc"" 	##F++ 
 >,,U6]];; %,]%7%78H&%Q%QNNJ #    !&$// #v[a[k[tvv  
 $  E%eS11 'T9>9QT T   " " 	LLNNN--//"#
'++G44
s   AD" "A3Fc                 K   |j         |                     d|           	 |                     |d           d{V r!|j                             |           d{V  nt	          j        d          	 |                     d|           dS # t          j        $ r,}|j                             ||           d{V  Y d}~dS d}~ww xY w|j        r6t	          j	        d|j         d          }|                     d	||           dS dS )
a\  |coro|

        Invokes the command given under the invocation context and
        handles all the internal event dispatch mechanisms.

        .. versionchanged:: 2.0

            ``ctx`` parameter is now positional-only.

        Parameters
        -----------
        ctx: :class:`.Context`
            The invocation context to invoke.
        Nr   Tr   z'The global check once functions failed.command_completionz	Command "z" is not foundcommand_error)
r   r   r   invoker   CheckFailureCommandErrordispatch_errorr  CommandNotFound)ra   r   excs      rB   r  zBotBase.invokeM  se      ;"MM)S)))9cT:::::::: Y+,,S1111111111 -.WXXX 2 2C88888 & ; ; ;k00c:::::::::::::::;  	5()US5E)U)U)UVVCMM/344444	5 	5s   AB C!CCc                  K   |j         j        rdS |                     |           d{V }|                     |           d{V  dS )a  |coro|

        This function processes the commands that have been registered
        to the bot and other groups. Without this coroutine, none of the
        commands will be triggered.

        By default, this coroutine is called inside the :func:`.on_message`
        event. If you choose to override the :func:`.on_message` event, then
        you should invoke this coroutine as well.

        This is built using other low level tools, and is equivalent to a
        call to :meth:`~.Bot.get_context` followed by a call to :meth:`~.Bot.invoke`.

        This also checks if the message's author is a bot and doesn't
        call :meth:`~.Bot.get_context` or :meth:`~.Bot.invoke` if so.

        .. versionchanged:: 2.0

            ``message`` parameter is now positional-only.

        Parameters
        -----------
        message: :class:`discord.Message`
            The message to process commands for.
        N)r  rM   ry  r  )ra   ro  r   s      rB   process_commandszBotBase.process_commandsk  si      4 > 	F$$W--------kk#rA   c               @   K   |                      |           d {V  d S rY   )r  )ra   ro  s     rB   
on_messagezBotBase.on_message  s2      ##G,,,,,,,,,,,rA   )rl   rm   rg   rn   rh   ro   ri   rp   rj   rq   rk   rr   rs   rt   ru   rv   rO   rw   )rO   rw   )r   rU   r   r   r   r   rO   rw   )r   r   rO   rw   )r   rU   rO   r   )
r   r   r   r9   r   r   r   r   rO   r   )
r   r   r   r9   r   r   r   r   rO   r   )r   r   r   r   rO   rw   )r   rJ   rO   rJ   )r   r   r   r9   rO   rw   r  )r   r   r   r9   rO   r9   )rR   r&   rO   r9   )r  rK   rO   rK   )r   rU   r   r+   rO   rw   )r   rU   rO   r  )
r   r   r  r9   r   r  r  r  rO   rw   )r   rU   rO   r#  )r   rU   r   r  r  r  rO   r#  )rO   r)  )r   rU   rO   rw   )r<  r=  r>  rU   rO   rw   )rG  rH  r>  rU   rO   rw   )r   rU   rT  rp   rO   rU   )r   rU   rT  rp   rO   rw   )rO   re  )rO   rn   )ri  rn   rO   rw   )rO   rm  )ro  r$   rO   rp  )ru  rv  rO   rw  )ru  rv  rz  r{  rO   r,   )ru  rv  rz  r{  rO   r   )r   r   rO   rw   )ro  r$   rO   rw   )7r<   r=   r>   rc   r   CommandTreer   r{   r   r   r   r   copy_docClientr   r   r   r   r   r   r   r   r   r   r   r   r  r  r
  r  r  r  r"  r%  r   propertyr-  r;  rF  rS  rY  r]  r   rd  rg  rg   setterr   rt  r   ry  r  r  r  __classcell__)r   s   @rB   re   re      s       
 /78D8P%);B=D+- +- +- +- +- +- +- +-^q q q q q q"= = = = = = ]GN011     21" ]J233; ; ; ; ; 43; ]J566     76$ 5<!%    4 5<!%    4T T T T<   @ LQ & & & & & &4 OT      2( ( ( (T IN C C C C C C1+ 1+ 1+ 1+f" " " "H# # # #N ;B "- "- "- "- "-H >E     0 ") " " " " "V %,&-T$ T$ T$ T$ T$ T$l% % % %8 &-&-C C C C C CJ 3 3 3 X3. . . .6, , , ,$) ) ) )41 1 1 1 KO 36 36 36 36 36 36j MQ -6 -6 -6 -6 -6 -6^ MQ A A A A A AF 9 9 9 X9 " " " X" & & & &&    X) ) ) )V    X    X &a a a a a aF5 5 5 5<   B- - - - - - - -rA   re   c                      e Zd ZdZdS )rH   a)  Represents a Discord bot.

    This class is a subclass of :class:`discord.Client` and as a result
    anything that you can do with a :class:`discord.Client` you can do with
    this bot.

    This class also subclasses :class:`.GroupMixin` to provide the functionality
    to manage commands.

    Unlike :class:`discord.Client`, this class does not require manually setting
    a :class:`~discord.app_commands.CommandTree` and is automatically set upon
    instantiating the class.

    .. container:: operations

        .. describe:: async with x

            Asynchronously initialises the bot and automatically cleans up.

            .. versionadded:: 2.0

    Attributes
    -----------
    command_prefix
        The command prefix is what the message content must contain initially
        to have a command invoked. This prefix could either be a string to
        indicate what the prefix should be, or a callable that takes in the bot
        as its first parameter and :class:`discord.Message` as its second
        parameter and returns the prefix. This is to facilitate "dynamic"
        command prefixes. This callable can be either a regular function or
        a coroutine.

        An empty string as the prefix always matches, enabling prefix-less
        command invocation. While this may be useful in DMs it should be avoided
        in servers, as it's likely to cause performance issues and unintended
        command invocations.

        The command prefix could also be an iterable of strings indicating that
        multiple checks for the prefix should be used and the first one to
        match will be the invocation prefix. You can get this prefix via
        :attr:`.Context.prefix`.

        .. note::

            When passing multiple prefixes be careful to not pass a prefix
            that matches a longer prefix occurring later in the sequence.  For
            example, if the command prefix is ``('!', '!?')``  the ``'!?'``
            prefix will never be matched to any message as the previous one
            matches messages starting with ``!?``. This is especially important
            when passing an empty string, it should always be last as no prefix
            after it will be matched.
    case_insensitive: :class:`bool`
        Whether the commands should be case insensitive. Defaults to ``False``. This
        attribute does not carry over to groups. You must set it to every group if
        you require group commands to be case insensitive as well.
    description: :class:`str`
        The content prefixed into the default help message.
    help_command: Optional[:class:`.HelpCommand`]
        The help command implementation to use. This can be dynamically
        set at runtime. To remove the help command pass ``None``. For more
        information on implementing a help command, see :ref:`ext_commands_help_command`.
    owner_id: Optional[:class:`int`]
        The user ID that owns the bot. If this is not set and is then queried via
        :meth:`.is_owner` then it is fetched automatically using
        :meth:`~.Bot.application_info`.
    owner_ids: Optional[Collection[:class:`int`]]
        The user IDs that owns the bot. This is similar to :attr:`owner_id`.
        If this is not set and the application is team based, then it is
        fetched automatically using :meth:`~.Bot.application_info`.
        For performance reasons it is recommended to use a :class:`set`
        for the collection. You cannot set both ``owner_id`` and ``owner_ids``.

        .. versionadded:: 1.3
    strip_after_prefix: :class:`bool`
        Whether to strip whitespace characters after encountering the command
        prefix. This allows for ``!   hello`` and ``!hello`` to both work if
        the ``command_prefix`` is set to ``!``. Defaults to ``False``.

        .. versionadded:: 1.7
    tree_cls: Type[:class:`~discord.app_commands.CommandTree`]
        The type of application command tree to use. Defaults to :class:`~discord.app_commands.CommandTree`.

        .. versionadded:: 2.0
    allowed_contexts: :class:`~discord.app_commands.AppCommandContext`
        The default allowed contexts that applies to all application commands
        in the application command tree.

        Note that you can override this on a per command basis.

        .. versionadded:: 2.4
    allowed_installs: :class:`~discord.app_commands.AppInstallationType`
        The default allowed install locations that apply to all application commands
        in the application command tree.

        Note that you can override this on a per command basis.

        .. versionadded:: 2.4
    N)r<   r=   r>   __doc__r@   rA   rB   rH   rH     s        a aF 	DrA   rH   c                  :    e Zd ZdZereej        deedddZ	dS dS )rI   a&  This is similar to :class:`.Bot` except that it is inherited from
    :class:`discord.AutoShardedClient` instead.

    .. container:: operations

        .. describe:: async with x

            Asynchronously initialises the bot and automatically cleans.

            .. versionadded:: 2.0
    Nrf   rl   rm   rg   rn   rh   ro   ri   rp   rj   rq   rk   rr   rs   rt   r   Unpack[_AutoShardedBotOptions]rO   rw   c                   d S rY   r@   )	ra   rl   rg   rh   ri   rj   rk   rs   r   s	            rB   r{   zAutoShardedBot.__init__  s	     3rA   )rl   rm   rg   rn   rh   ro   ri   rp   rj   rq   rk   rr   rs   rt   r   r  rO   rw   )
r<   r=   r>   r  r	   rc   r   r  r   r{   r@   rA   rB   rI   rI     sd        
 
   3;<H<T)-?FAH	 	 	 	 	 	 	 	 rA   rI   )rM   r(   rN   r$   rO   rP   )rT   rU   rO   rV   )er  
__future__r   r  r   collections.abcr   importlib.utilrK  rC  loggingr+  typingr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   discord.app_commands.treer   discord.utilsr   r   corer   r~  r   r   r   ry   r   helpr   r   r   r   hybridr   r   r    r!   typing_extensionsr"   r#   importlib.machinerydiscord.messager$   discord.interactionsr%   discord.abcr&   r'   _typesr(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   discord.clientr3   discord.shardr4   rU   _Prefix_PrefixCallable
PrefixTyper6   rE   __all__rJ   rK   	getLoggerr<   r   rF   rG   r^   rc   r?   re   r  rH   AutoShardedClientrI   r@   rA   rB   <module>r     s    0 # " " " " "               



                                 "              9 9 9 9 9 9 0 0 0 0 0 0 0 0                         1 1 1 1 1 1 1 1       L L L L L L L L L L L L N........''''''000000++++++++                pppppppppppppp------777777HSM3&'G($')ABOw 556J    nE     NMMMM!:KMMM GCLLge:&&&w""
9 
9 
9 
9# # # #L( ( ( ( ( ( ( (
     a- a- a- a- a-j a- a- a-H'd	 d	 d	 d	 d	'7> d	 d	 d	N    Wg7     rA   