Hello, I am currently working on a command where I need an await reaction function for it to work. This is a small snippet of the command I am working on. Can anybody help?
message.channel.send(startEmbed).then(function (message) {
message.react('769948403772817418')
message.react('769948393992093716')
message.react('769948383837421608')
message.react('769948373884338207')
message.react('769948361985753108')
message.react('769948342053765140')
message.react('769948352233209897')
message.react('769948333124354089')
message.react('769948319995920434')
message.react('769948309405040640')
message.react('769948292812898334')
const filter = (user) => {
return user.id === message.author.id;
}
message.awaitReactions(filter, { max: 1, time: 60000 })
.then(collected => {
if (reaction.emoji.id === '769948403772817418') {
message.reply('test');
}
})