-
Notifications
You must be signed in to change notification settings - Fork 474
How do I deploy a bot on Heroku? #109
Comments
hello, about webhooks, each time a message is sent to the bot, telegram sends a request to your webhook with the message object. so, yes they are basically used for pushing updates to your bot. i havent personally used heroku but it shouldnt be different from generic webhook bots so you can also take a look at our webhook examples here |
Yes, I have tried to emulate #96 , but it seems the bot does not handle any requests whatsoever. It displays the
Can you point me where I'm going wrong here? I run the local development version of the bot without the Webhooks and Flask, and it works flawlessly. |
i think the problem is that you never initiate your flask app ... or set the webhook for that matter. bot.message_loop(run_forever=True, source=update_queue) could you move this line to the end of file and see if the problem is solved ? also i would reduce the timeout that you set, your current timeout really acts as a memory leak, it initiates a new class instance for each user but never removes it. |
Thanks, yes, it seems the position of
The |
that is more of a flask problem than telepot. https://community.nitrous.io/tutorials/deploying-a-flask-application-to-heroku if all that failed try opening an issue with flask or using another http library. |
One thing I want to add. You should not need |
This might be a noob question, and not a technical issue, but I'm having a real difficult time wrapping my head around deployment on Heroku.
I tried using Webhooks, and if I'm right, they are used for just pushing app updates(?). It would be great if one could point me towards some easy to learn tutorials about deploying the bot on Heroku.
Sorry if this question doesn't suit this forum.
Also, kudos to @nickoala for this Python wrapper!
The text was updated successfully, but these errors were encountered: