# Path: sirbot/slack/store/user.py
# class User(SlackItem):
# 
#     def __init__(self, id_, raw=None, dm_id=None, last_update=None,
#                  deleted=False):
#         """
#         Class representing a slack user.
# 
#         :param id_: id of the user
#         """
# 
#         super().__init__(id_, raw, last_update)
#         self.dm_id = dm_id
#         self.deleted = deleted
# 
#     @property
#     def admin(self):
#         return self._raw.get('is_admin', False)
# 
#     @admin.setter
#     def admin(self, _):
#         raise NotImplementedError
# 
#     @property
#     def bot(self):
#         return self._raw.get('is_bot', False)
# 
#     @bot.setter
#     def bot(self, _):
#         raise NotImplementedError
# 
#     @property
#     def bot_id(self):
#         return self._raw.get('profile', {}).get('bot_id', '')
# 
#     @bot_id.setter
#     def bot_id(self, _):
#         raise NotImplementedError
# 
#     @property
#     def send_id(self):
#         return self.dm_id
# 
# Path: sirbot/slack/errors.py
# class SlackInactiveDispatcher(SlackSetupError):
#     """Raised when adding endpoint to a missing dispatcher"""
# 
# class SlackNoThread(SlackError):
#     """Message without ts or thread_ts"""


import logging
from .store.user import User
from .errors import SlackInactiveDispatcher, SlackNoThread

            if message.response_url:
                # Message with a response url are response to actions or slash
                # commands
                data = message.serialize(type_='response')
                await self._http_client.response(
                    data=data,
                    url=message.response_url
                )
            elif isinstance(message.to, User) and self.bot.type == 'rtm':
                data = message.serialize(type_='send', to=self.bot.type)
                message.raw = await self._http_client.message_send(
                    data=data,
                    token='bot'
                )
            elif isinstance(message.to, User) and self.bot.type == 'event':
                data = message.serialize(type_='send', to=self.bot.type)
                message.raw = await self._http_client.message_send(data=data)
            else:
                data = message.serialize(type_='send', to=self.bot.type)
                message.raw = await self._http_client.message_send(data=data)

    async def update(self, *messages):
        """
        Update the messages provided and update their timestamp

        :param messages: Messages to update
        """
        for message in messages:


# Path: sirbot/slack/store/user.py
# class User(SlackItem):
# 
#     def __init__(self, id_, raw=None, dm_id=None, last_update=None,
#                  deleted=False):
#         """
#         Class representing a slack user.
# 
#         :param id_: id of the user
#         """
# 
#         super().__init__(id_, raw, last_update)
#         self.dm_id = dm_id
#         self.deleted = deleted
# 
#     @property
#     def admin(self):
#         return self._raw.get('is_admin', False)
# 
#     @admin.setter
#     def admin(self, _):
#         raise NotImplementedError
# 
#     @property
#     def bot(self):
#         return self._raw.get('is_bot', False)
# 
#     @bot.setter
#     def bot(self, _):
#         raise NotImplementedError
# 
#     @property
#     def bot_id(self):
#         return self._raw.get('profile', {}).get('bot_id', '')
# 
#     @bot_id.setter
#     def bot_id(self, _):
#         raise NotImplementedError
# 
#     @property
#     def send_id(self):
#         return self.dm_id
# 
# Path: sirbot/slack/errors.py
# class SlackInactiveDispatcher(SlackSetupError):
#     """Raised when adding endpoint to a missing dispatcher"""
# 
# class SlackNoThread(SlackError):
#     """Message without ts or thread_ts"""


# Path: sirbot/slack/wrapper.py
import logging
from .store.user import User
from .errors import SlackInactiveDispatcher, SlackNoThread


            if message.response_url:
                # Message with a response url are response to actions or slash
                # commands
                data = message.serialize(type_='response')
                await self._http_client.response(
                    data=data,
                    url=message.response_url
                )
            elif isinstance(message.to, User) and self.bot.type == 'rtm':
                data = message.serialize(type_='send', to=self.bot.type)
                message.raw = await self._http_client.message_send(
                    data=data,
                    token='bot'
                )
            elif isinstance(message.to, User) and self.bot.type == 'event':
                data = message.serialize(type_='send', to=self.bot.type)
                message.raw = await self._http_client.message_send(data=data)
            else:
                data = message.serialize(type_='send', to=self.bot.type)
                message.raw = await self._http_client.message_send(data=data)

    async def update(self, *messages):
        """
        Update the messages provided and update their timestamp

        :param messages: Messages to update
        """
        for message in messages:


            if isinstance(message.to, User):