function onComplete(personFound) {
let args = messageArray.slice(0);
let word = args[0];
let person = word.replace('%', '');
message.delete();
if (personFound == true) {
let create = "";
let edit = "";
let del = "";
let search = "";
let cancel = "❌";
let embed = new Discord.RichEmbed()
.setColor("#00ffff")
.addField("Menu", `test`);
message.channel.send(embed).then(function (message) {
message.react(create);
message.react(edit);
message.react(del);
message.react(search);
message.react(cancel);
}).then(() => {
message.channel.awaitReactions(response => response.author.id === message.author.id, { max: 1 }).then((collected) => {
let reaction = collected.first().content;
console.log(reaction);
})
}).catch(function () {
console.error();
});
}
else {
}
}
我正在尝试收集反应,我尝试了上面的方法,但是我的问题是它在原始用户添加反应之前,控制台记录了一条空消息,添加反应后它没有记录任何内容,我在做什么错?