Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to do your bot 24/7
SneakyCatYT (1)

From, past 7 days I have been seeing some people are searching for "how to get your discord bot 24/7" and a lot of them don't work or some of you don't understand in this tutorial I will be telling you how do we really add uptime robot to your discord bot!
first when you make your discord bot in https://repl.it go and make a new file and name it "server.js" and paste this code there.

const express = require('express');

const server = express();

server.all('/', (req, res)=>{
res.send('Your bot is alive!')
function keepAlive() {
server.listen(3000, ()=>{console.log("Server is ready!")});
module.exports = keepAlive;

and when finished head to index.js where you create your commands and go to the 1 line and type this "const keepAlive = require("./server.js")"
where your client.login is of that up type there this "keepAlive();"

and then go to https://uptimerobot.com/ create and account and then go and create a monitor and select HTTPS(s) and type a friendly name for your bot and then run your bot then there will be a link in the terminal and then copy that and paste it in the url box and click create monitor

That's it
Thank you
Sneaky cat

IntellectualGuy (674)

There is the new always on repls for hacker plan...