message.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:sirbot-slack 作者: pyslackers 项目源码 文件源码
def register(self, match, func, flags=0, mention=False, admin=False,
                 channel_id='*'):

        logger.debug('Registering message: %s, %s from %s',
                     match,
                     func.__name__,
                     inspect.getabsfile(func))

        if not asyncio.iscoroutinefunction(func):
            func = asyncio.coroutine(func)

        option = {
            'func': func,
            'mention': mention,
            'admin': admin,
            'channel_id': channel_id
        }

        self._endpoints[re.compile(match, flags)].append(option)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号