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

197
Views
Recordar comando discord.js

Así que estoy trabajando en un bot recordatorio, pero no como !recordatorio (Tiempo en s/m/h) sino como en !recordatorio (Hora específica como las 20:00), estoy tratando de dejar que el bot calcule el tiempo entre la hora actual y la hora de entrada.

Esto es lo que he ejecutado:

 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!