• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

433
Vistas
Replit Discord Bot Keeps Turning Off

First off, I would like to say, I know very little coding, so please bear with me here.

Introduction

Despite not knowing any coding, I decided to make a discord bot for the fun of it. I also don't have any money, so I can't buy any fancy servers or software, so I started making it on replit. The bot is all done, and it doesn't do much really, just sends an embed on seeing a command, and I've set up a command handler and everything.

Problem

The problem I'm having is, it keeps going offline. Before it would go offline after a few hours, but I tested it recently, and it went out in around 20 minutes. There's no error or anything, just when I open up replit its off and I have to run it again.

Troubleshooting

I looked online, but all of those said to get a server and hook it up to uptimerobot, or have keepAlive(), but I have already had all this since the beginning. I even checked uptimerobot and it hasn't lost connection once in the past 2 weeks.

To test this, I made another quick discord bot, with only a ping command, and after 3 or so days, it has yet to go off. So I'm thinking that the problem might be I have too many commands (105 to be exact) for the basic replit resources to handle, but I'm not sure.

No one has even used the bot when it goes offline, so I really don't know what to do.

Any help would be great.

Thanks

about 3 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I won't suggest repl.it if you want to host your discord bot. Some good alternatives would be Heroku and Railway. I would personally suggest Railway (https://railway.app)

(Do note: you need to learn git and GitHub if you are going to use either of this platforms, and of course you need to learn them either way at a later date.)

(Also do note that I don't really suggest using these free hosters, get a paid vps, or keep using this.)

about 3 years ago · Juan Pablo Isaza Denunciar

0

Replit's free plan doesn't allow 24/7 hosting

But there is a trick!

Add this to your code

const express = require("express")
const app = express()

const server = app.listen(3000, () => {
    console.log(`Express running → PORT ${server.address().port}`)
})

app.get("/", (req, res) => {
    res.send("Online!")
})

Then copy your replit link and use a service which periodically pings your repl project to do that, here's a video of how to do it https://youtu.be/wZbAinOmays

How it works

Express is a package used for making HTTP servers and if you make a request to the HTTP server periodically, replit won't stop your project.

I would still use a paid service, because as others pointed out, you get what you pay for

about 3 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda