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

87
Views
Cómo hacer que una persona detenga la ejecución de un comando que inició la ejecución de otro comando discord.js

Estoy haciendo un comando de correo no deseado, quiero que el ejecutor del comando de correo no deseado solo pueda detenerlo. Estoy confundido sobre cómo hacerlo. Aquí está mi código (todavía no he probado nada por mi cuenta) else if (command === prefix + "spam") {spamText = setInterval(() => {message.channel.send( ${args.slice(0)) .join(" ")} )}, 1500);} else if (command === prefix + "stopspam"{ clearInterval(spamText); message.reply("Stopped the spamming. Hope it created some chaos :skull:")}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

necesitas extraer tu intervalo para poder detenerlo

 function Spam(){ message.channel.send(${args.slice(0).join(" ")}) } let myInterval; if (command === prefix + "spam") { myInterval = setInterval(Spam, 1500); } else if (command === prefix + "stopspam"){ clearInterval(spamText); message.reply("Stopped the spamming. Hope it created some chaos :skull:"); }

y cuidado con el uso. a nadie le gusta el spammer

about 4 years ago · Juan Pablo Isaza Report
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!