Discord Bot goes offline after 10 hours

So i have a uptime commmand which tells me how long the bot has been online, so i fixed most of my problems yesterday regarding server.js and uptimerobot after a long time, i then thought it would never go offline. but today morning when i used my uptime command it had restarted as the uptime command showed that the bot was online for 39 minutes, but before it was 6 hours 29 minutes when i last checked and i was asleep for like 4 and a half hours. So i think it lasted for 10 hours approx, then I checked my uptime robot dashboard and it didnt show any downtime. So my question is, is this normal to happen? or i have to fix something. because i dont want it to go offline anytime or refresh.
`
const express = require(“express”);
const app = express();

const dreams = [
“Find and count some sheep”,
“Climb a really tall mountain”,
“Wash the dishes”
];

app.use(express.static(“public”));

app.get("/", (request, response) => {
response.sendFile(__dirname + “/views/index.html”);
});

app.get("/dreams", (request, response) => {
response.json(dreams);
});

const listener = app.listen(process.env.PORT, () => {
console.log("Your app is listening on port " + listener.address().port);
});`
my server.js file which is currently in index.js and in my package.json its “start”: node index.js
so i dont think that is the problem as my bot would go down after 5 mins, if that was the problem

You can try using services like Uptime Robot.

didnt u read? i am using uptimerobot

1 Like

Every project who are not boosted restart if they have more than 12h of uptime too if they get 1 request per 5 minutes

2 Likes