making sure embed title is correct

im trying to get it so that the command works for things with "Card View" as the title in the embed, so no other embed except those would work. how can i do so?
client.on("message", () => {
    if(message.embeds[0].title === 'Card View'){
        console.log('this is working')
    }
});

p.s i have no clue what im doing and just going off tutorials but none are working.
the issue that its having right now is not that theres any errors or anything, its just not sending the console log which means something is going on wrong. most likely the equal signs but still i am confused. also not sure if the client on thing works either.
Was this page helpful?