Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
How to make a message send on certain days and hours on discord.js v13

All my code hasn't worked yet and was wondering how I could do it

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The way you ask is too broad for Stack overflow, like what user @kevintechie said. Anyway, for sending a message at a specific time, I recommend using Cron

The possible varibles of Cron are:

Seconds: 0-59

Minutes: 0-59

Hours: 0-23

Day of Month: 1-31

Months: 0-11 (January - December)

Day of Week: 0-6 (Sunday - Saturday)

Lets say you want to send a message everyday at 6 AM, using your local time

var cron = require("cron");

client.on('message', ...); //you don't have to add anything to the message listener

let morning = new cron.CronJob('00 00 06 * * *', () => {
  // Everyday at 6 AM, it will do something you want to it to do
  let channel = yourGuild.channels.get('id');
  channel.send('Morning everyone');
});
// to start the reminder
morning.start()
// to stop the reminder
morning.stop()

Else if you want it to remind from Mon to Fri, then it would be ...new cron.CronJob('00 00 06 * * 1-5', ()=> {...

about 4 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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda