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

193
Vistas
Remind command discord.js

So I am working on a reminder bot, but not as !reminder (Time in s/m/h) but as in !reminder (Specific time such as 20:00), atm I am trying to let the bot calculate the time between the current time and the input time.

This is what I have run:

const config = require("./config.json");
const discord = require("discord.js")
const ms = require("ms");
const client = new Client({   intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

client.on('messageCreate', client => {
  let args = message.content.split(" ")
  let inputTime = args[0]
  let date = new Date();
  let timeNow = date.getHours() + ':' + date.getMinutes() + ';' + date.getSeconds();
//let timer = timeNow until inputTime? (How do i calc this)

    message.channel.send(`Reminder set for ${timer}`);

    setTimeout(() => {

        message.channel.send(`Reminder!`);

    }, ms(timer));
}

 if(!inputTime && !inputTime.includes(':')) return message.reply('Please make use of XX:XX in the mentioned time.')

}); client.login(config.token);
about 4 years ago · Juan Pablo Isaza
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