Command help (whois command)

can someone help me, whenever i send $whois {@user} is sends like 4-6 of the same embed

client.on('message', async message =>{
    if(message.content.startsWith(`${prefix}whois` || `${prefix}userinfo`)){  
        const target = message.mentions.users.first()|| message.author
         const whois = new Discord.MessageEmbed()
                .setAuthor(`${target.username}`)
                .addField('Discord Name', `${target.username}`, true)
                .addField('Tag', `${target.discriminator}`, true)
                .addField('Joined Server Date', `${target.joinedAt}`, true)
                .addField('Account Creation Date', `${target.createdAt}`, true)
                .addField('Is bot?', `${target.bot}`, true)
                .addField('ID', `${target.id}`, true)
                .addField('FW', `${target.lastMessage}`, true)
                .setThumbnail(target.displayAvatarURL({dynamic: true}))
                .setColor('RANDOM')
                message.channel.send(whois)
        }
    }
);

I’m not an expert but your code looks right to me. Is there any chance you have subscribed your bot to the channel multiple times, or there are somehow multiple instances of your bot running?

Does the “userinfo” test ever work? It looks like an expression and I thought startsWith expects a constant string. I’ve never seen an OR construct in it.

That wouldn’t cause it to repeat but you may want to filter out bot messages which could be causing it to trigger multiple times.