# Path: phial/wrappers.py
# class Message:
#     """
#     A representation of a Slack message.
# 
#     :param text: The message contents
#     :param channel: The Slack channel ID the message was sent from
#     :param user: The user who sent the message
#     :param timestamp: The message's timestamp
#     :param team: The Team ID of the Slack workspace the message was
#                  sent from
#     :param bot_id: If the message was sent by a bot
#                    the ID of that bot. Defaults to None.
#     """
# 
#     def __init__(
#         self,
#         text: str,
#         channel: str,
#         user: str,
#         timestamp: str,
#         team: Optional[str],
#         bot_id: Optional[str] = None,
#     ) -> None:
#         self.text = text
#         self.channel = channel
#         self.user = user
#         self.timestamp = timestamp
#         self.team = team
#         self.bot_id = bot_id
# 
#     def __repr__(self) -> str:
#         return "<Message: {0} in {1}:{2} at {3}>".format(
#             self.text, self.channel, self.team, self.timestamp
#         )
# 
#     def __eq__(self, other: object) -> bool:
#         return self.__dict__ == other.__dict__


from typing import cast
from werkzeug.local import LocalProxy, LocalStack
from phial.wrappers import Message
"""Provides the globaly scoped parts of phial."""




def _find_command() -> Message:
    """Gets the command from the context stack."""
    top = _command_ctx_stack.top
    if top is None:
        raise RuntimeError("Not in a context with a command")

# Path: phial/wrappers.py
# class Message:
#     """
#     A representation of a Slack message.
# 
#     :param text: The message contents
#     :param channel: The Slack channel ID the message was sent from
#     :param user: The user who sent the message
#     :param timestamp: The message's timestamp
#     :param team: The Team ID of the Slack workspace the message was
#                  sent from
#     :param bot_id: If the message was sent by a bot
#                    the ID of that bot. Defaults to None.
#     """
# 
#     def __init__(
#         self,
#         text: str,
#         channel: str,
#         user: str,
#         timestamp: str,
#         team: Optional[str],
#         bot_id: Optional[str] = None,
#     ) -> None:
#         self.text = text
#         self.channel = channel
#         self.user = user
#         self.timestamp = timestamp
#         self.team = team
#         self.bot_id = bot_id
# 
#     def __repr__(self) -> str:
#         return "<Message: {0} in {1}:{2} at {3}>".format(
#             self.text, self.channel, self.team, self.timestamp
#         )
# 
#     def __eq__(self, other: object) -> bool:
#         return self.__dict__ == other.__dict__


# Path: phial/globals.py
from typing import cast
from werkzeug.local import LocalProxy, LocalStack
from phial.wrappers import Message

"""Provides the globaly scoped parts of phial."""




def _find_command() -> Message:
    """Gets the command from the context stack."""
    top = _command_ctx_stack.top
    if top is None:
        raise RuntimeError("Not in a context with a command")

    return cast(Message, top)