I want to have a callback like return if the user who called the command mentions themself

My code is

const { GuildMember, GuildMemberRoleManager, DiscordAPIError } = require("discord.js");

module.exports = {
    name: 'jail',
    description: "This command mutes a member a member!",
    execute(message, args, Discord){
        let target = message.mentions.users.first();
        let memberTarget = message.guild.members.cache.get(target.id);
        
            if (message.author.id = memberTarget.id) {
               message.reply('You cant jail yourself dummy'); return;
            } else {
             
            }
                        
        if(message.member.permissions.has("KICK_MEMBERS")){
           
        } else {message.channel.send(`Become an admin to use this <@${message.member.user.id}>`); return;}

        if(target){
            
            memberTarget.roles.set([])
            .then(message => {
            memberTarget.roles.add('782623155457753099')})
            const NewEmbedMessage = new Discord.MessageEmbed()
            .setTitle('Jailing')
            .addFields(
                {name: `You just jailed`, value: `<@${memberTarget.user.id}>`},
                {name: `You can unjail people by doing`, value: `arax unjail @user`},
                {name: `unjail command coming soon`, value: null}
            )
            message.channel.send(NewEmbedMessage)
        }else{
            message.channel.send(`You coudn't jail that member!`);
        }
    }
}

the problem is here

let target = message.mentions.users.first();
        let memberTarget = message.guild.members.cache.get(target.id);
        
            if (message.author.id = memberTarget.id) {
               message.reply('You cant jail yourself dummy'); return;
            } else {
             
     }

any help?

Answer

In if-statements you have to use == or ===. = is there to set values of variables. So just change this:

if (message.author.id = memberTarget.id)

into this:

if (message.author.id === memberTarget.id)