utils.py 文件源码

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

项目:bagelbot 作者: statmuse 项目源码 文件源码
def update_everyone_from_slack(store, sc):
    """Updates our store's list of `everyone`.

    This list is comprised of all slack users with
    the specified EMAIL_DOMAIN in config.py.

    Args:
        store (instance): A persistent, dictionary-like object used to keep information about past/future meetings
        sc (SlackClient): An instance of SlackClient
    """
    if not sc:
        sc = get_slack_client()

    users = sc.api_call("users.list")
    store['everyone'] = [m['name'] for m in users['members']
                         if not m['deleted'] and
                         m['profile'].get('email') and
                         m['profile']['email'].endswith('@' + EMAIL_DOMAIN)]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号