Sample files to run a Telegram Bot with Heroku without dyno sleeping.
Make sure to run npm install
before commiting your bot to Heroku.
By default, Heroku apps sleep after 1 hour of inactivity. This can be prevented by running the app as a worker dyno instead of a web dyno. This is already set on the Procfile, but make sure this is also true on your dashboard.
-
Go to your [Heroku dashboard]
-
Resources tab
- Check worker, uncheck web (if it's checked)