# 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
        await self._http_client.delete_reaction(message, reaction)

    async def get_reactions(self, message):
        """
        Query the reactions of messages

        :param messages: Messages to query reaction from
        :return: dictionary of reactions by message
        :rtype: dict
        """
        reactions = await self._http_client.get_reaction(message)
        for reaction in reactions:
            reaction['users'] = [
                self.users.get(id_=user_id)
                for user_id in reaction.get('users', list())
            ]

        message.reactions = reactions
        return reactions

    def add_action(self, id_, func, public=False):
        if 'action' in self._dispatcher:
            self._dispatcher['action'].register(id_, func, public=public)
        else:
            raise SlackInactiveDispatcher

    def add_event(self, event, func):
        if 'event' in self._dispatcher:
            self._dispatcher['event'].register(event, func)
        else:

# 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

        await self._http_client.delete_reaction(message, reaction)

    async def get_reactions(self, message):
        """
        Query the reactions of messages

        :param messages: Messages to query reaction from
        :return: dictionary of reactions by message
        :rtype: dict
        """
        reactions = await self._http_client.get_reaction(message)
        for reaction in reactions:
            reaction['users'] = [
                self.users.get(id_=user_id)
                for user_id in reaction.get('users', list())
            ]

        message.reactions = reactions
        return reactions

    def add_action(self, id_, func, public=False):
        if 'action' in self._dispatcher:
            self._dispatcher['action'].register(id_, func, public=public)
        else:
            raise SlackInactiveDispatcher

    def add_event(self, event, func):
        if 'event' in self._dispatcher:
            self._dispatcher['event'].register(event, func)
        else:

            raise SlackInactiveDispatcher