Discord.js command.name.toLowerCase() not working

Code :

for (const file of commands) {

        const command = require(`./commands/${dirs}/${file}`);

        console.log(`Loading command ${file}`);

        client.commands.set(command.name.toLowerCase(), command);

    };

});