Closed andry-lebedev closed 6 years ago
@WTFisThat1 I have the same error. I'm looking for a solution. We are waiting for the answer from the developer.
Dose your getMessage() method receive any request?
@eternnoir
@bot.message_handler(func=lambda message: True)
def delete_massage_user(message):
bot.delete_message(message.chat.id, message.message_id)
At me here such method. Deletes all incoming messages in the supergroup. But it's not that. And the fact that the bot does not even run on Heroku.
@WTFisThat1 you have not valid address in the set_webhook https.com//somename.herokuapp.com/bot and check getWebhookinfo
After deploying on heroku bot don't answer. Was trying as in example with flask.
token = os.environ['TELEGRAM_TOKEN']
bot = telebot.TeleBot(token)
server = Flask(name)
hadlers
and in the end
@server.route("/", methods=['POST']) def getMessage():
bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))]) return "!", 200
@server.route("/") def webhook(): bot.remove_webhook() bot.set_webhook(url="https.com//somename.herokuapp.com/bot") return "!", 200
server.run(host="0.0.0.0", port=int(os.environ.get('PORT', 5000))) server = Flask(name)