Is there a way to run my Discord.js Bot 24/7

Hey, I want to ask if there is any way to run my node.js application (a discord.js bot) 24/7?
And is it allowed?

As long as your bot or node app has a publicly accessible page in it somewhere you can configure a service like UptimeRobot to ping your app’s public page every 5 minutes or so and that will keep your project awake.

I just gave a quick overview of how to have a public page in your project using Express in project appears down even though not - Uptime robot. You could also look at the contents of the hello-express starter project for an example.

1 Like

Hey uhm now my bot is offline how can i start it?

That depends on what happened to turn it off.

You can run the refresh command in the console (click on the Status button and then on the Console button in the Status pane) to restart your whole project. If you’re seeing error in the Status pane then you’ll need to resolve those errors to get your bot running again.

1 Like

Oh do i need to change the start script to node bot.js?

nvm, I have it thank you :)!

@cori someone is sending ads

I flagged it as off-topic and the moderators will handle that.