main.py 文件源码

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

项目:Triton 作者: ArionMiles 项目源码 文件源码
def main(config):
    updater = Updater(config['token'])
    j = updater.job_queue

    def newAlert(bot, job):
        '''Polls the GitHub API every 2.5 minutes for new notifications.'''
        output = notifications(config)
        if output:
            bot.sendMessage(chat_id=config['chat_id'], text=output, parse_mode='markdown', \
                disable_web_page_preview=True)

    job_minute = Job(newAlert, 150.0) #Time in seconds
    j.put(job_minute, next_t=0.0)

    updater.start_polling()
    updater.idle()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号