slack.py 文件源码

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

项目:AutoTriageBot 作者: salesforce 项目源码 文件源码
def postMessage(message: str, channel: str=config.channel, attachments: List=[]) -> Optional[Mapping]:
    """ Post a message to the specified slack channel """
    if secrets.slackOauth:
        slack = Slacker(secrets.slackOauth)
        if channel:
            resp = slack.chat.post_message(channel, message, attachments=attachments)
            return resp.body
    return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号