discord.js DM command on roles not working

the event handling command is not properly reading, I suppose
the code goes like this

const {client, Message} = require('discord.js')

module.exports = {
    name :"hint",
    /**
     * @param {Client} client
     * @param {Message} message
     */

    

    client.on("messageCreate" , message => {
        if (message.content == (`${config.prefix}ph`)) {
            if (message.member.roles.cache.some(role => role.name === 'Puzzle 1')) {
                message.author.send("hint first puzzle")
            } else if (message.member.roles.cache.some(role => role.name === 'Puzzle 2')) {
                message.author.send("hint second puzzle")
                .catch(console.error);
            }}
     
    })
}

not sure where I went wrong.