I'm looking for a way yo check if 2 images are the same in discord.js, I'm programming a discord bot and couldn't find a way to check if 2 images are the same, I tried checking the attachments (see code below) but the biggest problem is that if you copy a image and send it in discord, the attachment URL changes (even if it is the same image), so checking if they are the same doesn't work. How can I check if a discord photo is an certain image?
This is what I have tried so far:
const image = new Discord.MessageAttachment ("https://cdn.discordapp.com/attachments/866328575451856937/868592900274012190/ZxZsWb93GUuscqCfviBuMYqk6mofTSE_1f4nHsR5uwyhZLllNEFFzyEO8zr0l8iRQJwKYHyKDVLEY1WJvWJIp0n1PfPNdXebz8c3.png")
if (msg.attachments.size > 0) {
if (msg.attachments.first().attachment == image.attachment) {
msg.channel.send("Same photo is sent")
}
}