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

119
Views
Tengo este código a continuación, se supone que debe enviar una incrustación de discordia después de 10 mensajes en un canal específico, pero por alguna razón no lo hace y no registra errores.
const { MessageEmbed } = require("discord.js") module.exports = { name: "test", description: "A test command", run: async(client, message, args)=>{ let count = 0; let channelId = message.channel.id; client.on("messageCreate", async(newMessage)=>{ // dont use "message" here if (newMessage.channel.id === channelId) { count = count + 1; if (count === 10) { let embed = new MessageEmbed() .setDescription("Hello") .setColor("RANDOM") return message.channel.send({ embeds: [embed] }) } } else if (newMessage.channel.id !== channelId) { return; } }) } }

Estoy tratando de crear un comando que envíe una inserción a un canal específico cada 10 mensajes que se envían, pero el código anterior no funciona y tampoco recibo ningún error. ¿Alguien podría ayudarme?

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!