Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!