Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda