s_sending.start() return '' @app.route(NOTIFICATION_PATH, methods=['POST']) def sending_notification(): chat_id = request.form['chat_id'] text = request.form['text'] unpaid_only = request.form['unpaid_only'] log = open('notification_log.txt', 'w') log.write(text) log.close() n_sending = Thread(target=send_notification, args=(text, chat_id, unpaid_only)) n_sending.start() return '' @app.route(STATUS_PATH, methods=['GET']) def chk_status(): return 'OK' bot.remove_webhook() time.sleep(1) bot.set_webhook((WEBHOOK_URL + WEBHOOK_PATH), certificate=open(CERT_NAME, 'r')) else: bot.remove_webhook() time.sleep(1) start_bot()
def webhook(): bot.remove_webhook() bot.set_webhook(url="https://umsdealer-bot.herokuapp.com/bot") return "!", 200
def index(): bot.remove_webhook() bot.set_webhook(url="https://{}.herokuapp.com/{}".format(APP_NAME, TOKEN)) return "Hello from Heroku!", 200
def webhook(): bot.remove_webhook() bot.set_webhook(url=https://rhisuminspotify.herokuapp.com + TOKEN) return "!"
def webhook(): bot.remove_webhook() bot.set_webhook(url=<heroku app url> + TOKEN) return "!"