Skip to content
Advertisement

heroku and nodejs erorr (Web process failed to bind to $PORT within 60 seconds of launch)

I am using discord.js and I have a code where if someone votes for my bot on https://top.gg the bot will send a message, but it got this error

JavaScript

Here is my code:

JavaScript

Please help me that would be very appreciated

Advertisement

Answer

Heroku changes the Port that runs Node Application from time to time. Try changing your webhook port to process.env.PORT. Check the code below.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement