communication.py 文件源码

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

项目:PEBA 作者: dtag-dev-sec 项目源码 文件源码
def sendSlack(channel, token, message, debug):
    """simple Slack sender for status reports"""
    #
    # simple input validation
    #
    if debug:
        app.logger.debug("Not sending out SLACK message: " + str(message))
        return 0

    if channel is None or token is None or message is None:
        return

    sc = SlackClient(token)

    sc.api_call(
        "chat.postMessage",
        channel=channel,
        text=message
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号