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:
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();
}
})}};