rtm.py 文件源码

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

项目:nameko-slack 作者: iky 项目源码 文件源码
def setup(self):

        try:
            config = self.container.config[constants.CONFIG_KEY]
        except KeyError:
            raise ConfigurationError(
                '`{}` config key not found'.format(constants.CONFIG_KEY))

        token = config.get('TOKEN')
        clients = config.get('BOTS')
        if token:
            self.clients[constants.DEFAULT_BOT_NAME] = SlackClient(token)
        if clients:
            for bot_name, token in clients.items():
                self.clients[bot_name] = SlackClient(token)

        if not self.clients:
            raise ConfigurationError(
                'At least one token must be provided in `{}` config'
                .format(constants.CONFIG_KEY))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号