bicingbot_app.py 文件源码

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

项目:bicingbot 作者: marivipelaez 项目源码 文件源码
def set_webhook():
    """
    Sets the BicingBot webhook in its Telegram Bot

    :return: HTTP_RESPONSE with 200 OK status and a status message.
    """
    response = 'Webhook configured'
    if request.url_root.startswith('https'):
        bot_response = get_bot().setWebhook('{}/bicingbot'.format(request.url_root))
        logger.debug(bot_response)
    else:
        response = 'Bad webhook: https url must be provided for webhook'
        logger.warn(response)
    return response
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号