pogobot.py 文件源码

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

项目:PogomBOT 作者: eugenio412 项目源码 文件源码
def addJob(bot, update, job_queue):
    chat_id = update.message.chat_id
    logger.info('[%s] Adding job.' % (chat_id))

    try:
        if chat_id not in jobs:
            job = Job(alarm, 30, repeat=True, context=(chat_id, "Other"))
            # Add to jobs
            jobs[chat_id] = job
            job_queue.put(job)

            # User dependant
            if chat_id not in sent:
                sent[chat_id] = dict()
            if chat_id not in locks:
                locks[chat_id] = threading.Lock()
            text = "Scanner started."
            bot.sendMessage(chat_id, text)
    except Exception as e:
        logger.error('[%s] %s' % (chat_id, repr(e)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号