Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda