bot.py 文件源码

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

项目:slack-timetable 作者: MoarCatz 项目源码 文件源码
def send_slack(self, attachments):
        """Sends a message to Slack"""
        # Create a Slack bot instance
        slack = Slacker(os.environ['SLACK_API_TOKEN'])

        # Send a message to #general channel
        self.log.info('sending a message to Slack')
        slack.chat.post_message('#general',
                                text = ' ',
                                username = 'timetable',
                                icon_emoji = ':spiral_calendar_pad:',
                                attachments = attachments)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号