§
    œä¤i  ã                   óD   — d dl mZ d dlmZ d dlmZ  G d„ d¦  «        ZdS )é    )ÚOptional)Ú	WebClient)ÚSlackResponsec                   ór   — e Zd ZU eed<   ee         ed<   eed<   dedee         fd„Zdede	fd„Z
defd„Zd	S )
ÚFailÚclientÚfunction_execution_idÚ_calledc                 ó0   — || _         || _        d| _        d S )NF)r   r	   r
   )Úselfr   r	   s      úW/root/projects/butler/venv/lib/python3.11/site-packages/slack_bolt/context/fail/fail.pyÚ__init__zFail.__init__   s   € ð
 ˆŒØ%:ˆÔ"ØˆŒˆˆó    ÚerrorÚreturnc                 ó~   — | j         €t          d¦  «        ‚d| _        | j                             | j         |¬¦  «        S )a   Signal that the custom function failed to complete.

        Kwargs:
            error: Error message to return to slack

        Returns:
            SlackResponse: The response object returned from slack

        Raises:
            ValueError: If this function cannot be used.
        Nz=fail is unsupported here as there is no function_execution_idT)r	   r   )r	   Ú
ValueErrorr
   r   Úfunctions_completeError)r   r   s     r   Ú__call__zFail.__call__   sB   € ð Ô%Ð-ÝÐ\Ñ]Ô]Ð]àˆŒØŒ{×2Ò2ÈÔIcÐkpÐ2ÑqÔqÐqr   c                 ó   — | j         S )z•Check if this fail function has been called.

        Returns:
            bool: True if the fail function has been called, False otherwise.
        )r
   )r   s    r   Úhas_been_calledzFail.has_been_called'   s   € ð Œ|Ðr   N)Ú__name__Ú
__module__Ú__qualname__r   Ú__annotations__r   ÚstrÚboolr   r   r   r   © r   r   r   r      s¨   € € € € € € ØÐÐÑØ# Cœ=Ð(Ð(Ñ(Ø€M€MMðàðð  (¨œ}ðð ð ð ðr˜cð r mð rð rð rð rð$ ð ð ð ð ð ð r   r   N)Útypingr   Ú	slack_sdkr   Úslack_sdk.webr   r   r   r   r   ú<module>r"      sm   ðØ Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'ð&ð &ð &ð &ð &ñ &ô &ð &ð &ð &r   