Skip to main content

Bot is sending Embed 6 times

Hi guys i need some help i have this code but the bots is sending the same embed 6 times i generated a new token for the bot and created a new bot but the same problem

on("playerConnecting",async(name) => {
    const player = global.source;
    let discorddd = "NOT DETECTED";
    for (let i = 0; i < GetNumPlayerIdentifiers(player); i++) {
        const identifier = GetPlayerIdentifier(player, i);
        if (identifier.includes('discord:')) {
            discorddd = identifier
        }
        discorddd = discorddd.split('discord:').pop()
                let e5566 = new MessageEmbed()
                e5566.setColor("RED")
                e5566.setDescription(`${discorddd}`)
            client.channels.cache.get('1051799184803643392').send(e5566)
        
    }
})

I tried to change to addfields but the same problem

Via Active questions tagged javascript - Stack Overflow https://ift.tt/31Ny5Iu

Comments