client.on('messageCreate', message => {
if(message.channel.id !== '928409019402575992') return;
if(message.attachments.size == 0) return message.delete();
const tik = client.emojis.cache.get('929061990721261650');
const more = client.emojis.cache.get('929062097764110386');
const carpi = client.emojis.cache.get('929062036468539493');
const emojis = [
tik,
more,
carpi
];
message.react(tik);
message.react(more);
message.react(carpi);
const filter = (r, user) => {
return !user.bot;
}
const collector = message.createReactionCollector(filter, {});
collector.on('collect', (reaction, user) => {
console.log(reaction);
if(emojis.includes(reaction.emoji)){
if(reaction.message.guild.members.cache.get(user).roles.has('909372241119162368')){
if(reaction.emoji == tik){
reaction.message.member.roles.add('928409184037396520');
} else if(reacion.emoji == more){
reaction.message.channel.send({ content: `${reaction.message.author} eksik bilgiler içeriyor attığın fotoğraf!` });
} else if(reacion.emoji == carpi){
reaction.message.member.roles.remove('928409184037396520');
}
}
}
})
});
This is my code with discord.js@v13 it works fine to collector part but collector.on(‘collect’) event is never calling like you can see I add a console.log part to event’s start and its not triggering when I react can anyone help?(also there was a problem on normal code part so I write my code as snippet here)