Want to see more topics?

Discord Bot Hosting Script

Versi yang sesuai dengan tutorial : (Updated)

const http = require('http');
const express = require('express');
const app = express();

app.get("/", (request, response) => {
  console.log('Pinging');
  response.sendStatus(200);
});

app.listen(8080);
  setInterval(() => {
    http.get(`LINK WEB KAMU`);
  }, 280000);


Versi terbaru, lebih praktis dan ampuh :
(Pastikan kamu menambahkan require('./server.js')(); di index.js agar file server.js tetap terjangkau.)

const app = require(express)();

app.get('/', (req, res) => res.send(`Connected to the server, and the bot must be ready right now.`));

module.exports = () => {
  app.listen(3000);
}


0 komentar

Post a Comment

Motto:

"Jangan berharap lebih, jika tidak berusaha lebih." ~Gray