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
评论列表
文章目录