Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

202
Vistas
Is there a way to personalise collectors to a user? Discord.js

To put it simply, my bot is reading off another bot to see if a drop has been dropped, however, there are some problems occurring.

Current Scenario:

  1. User 1 drops
  2. User 2 drops
  3. The bot my bot is reading off (ID:733122859932712980, hence the filter) sends the first drop
  4. My bot pings the role twice before the second drop has dropped.
  5. The bot my bot is reading off sends the second drop
  6. No ping from my bot

What I want is for the second ping to happen after the second drop happens

Current code:

const Discord = require('discord.js');

module.exports = {
    name: "drop",
    aliases:["d"],
    async execute(client, msg, args) {

const filter = m => m.author.id === "733122859932712980";



const collector = msg.channel.createMessageCollector({
filter
});

collector.on("collect", m => {
  if (m.embeds[0]){
        const embed = m.embeds[0]

        if(embed.author?.name.includes("K-DROP")){

 for (var i=0; i<embed.fields.length ; i++){
            if(embed.fields[i].name) {
              if(embed.fields[i].value.includes("Winner")){
               return;
              }
              else
              {
                m.channel.send("<@&980128851495641101>")
                break;
              } 
        }
    }
}
  collector.stop();
  }
  })}};
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda