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);

    };

});

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.