Reputation: 21
Well, I already tried, but I couldn't get him to react to the media message. It only reacts if there is no text in it ... then it becomes difficult ... Can someone help me? The code is:
if (message.content === '') { //In this part I am in doubt of how to put just react on media ...
try {
await message.react('✔️');
await message.react('✖️');
} catch (error) {
console.error('Does not recognize the emoji that another user has placed
(ignore)');//Ignore
}
}});
Thank you @Jakye!
Upvotes: 0
Views: 62
Reputation: 6625
if (message.attachments.size > 0) {
// We have media. (Photos / Videos)
try {
await message.react("✔️");
await message.react("✖️");
} catch (error) {
console.log(error);
}
}
Upvotes: 1