handler.py 文件源码

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

项目:poor-webhook 作者: ThreatResponse 项目源码 文件源码
def _event_handler(event_type, slack_event):
    """
    A helper function that routes events from Slack to our Bot
    by event type and subtype.
    Parameters
    ----------
    event_type : str
        type of event received from Slack
    slack_event : dict
        JSON response from a Slack reaction event
    Returns
    ----------
    obj
        Response object with 200 - ok or 500 - No Event Handler error
    """
    team_id = slack_event["team_id"]
    # ================ Team Join Events =============== #
    # When the user first joins a team, the type of event will be team_join
    if event_type == "team_join":
        pass
    else:
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号