I am attempting to detect when emojis are added to messages and do different things based on the emoji however currently it isn't doing anything. I found a thing mentioning doing it this way so I tried it, I also looked into event handling and tried putting it into its own file, below, and that didn't work either. Neither of them give errors they simply don't print anything.
inside of index.js:js client.on(Events.MessageReactionAdd, (reaction) => { console.log("event entered"); if (reaction.emoji.identifier == 'gold') { console.log("Reaction emoji gold!"); } else { console.log(reaction.emoji.identifier); } })events/messageReactionAdd.js:```js
const { Events, MessageFlags } = require('discord.js');
module.exports = {
name: Events.MessageReactionAdd,
async execute(reaction) {
console.log("event entered");
if (reaction.emoji.identifier == 'gold') {
console.log("Reaction emoji gold!");
} else {
console.log(reaction.emoji.identifier);
}
}
};