【发布时间】:2018-10-24 23:54:58
【问题描述】:
我正在尝试测试某人何时对机器人在嵌入中发布的 2 个表情符号之一做出反应,但当机器人对 ???? 做出反应时在嵌入时它会触发 if (reaction.emoji.name === '????') 语句,我不确定如何忽略机器人的前两个反应,人们可以对其做出反应
let msg2 = await orderChannel.send({embed: embed});
msg2.react('✅');
msg2.react('????');
const reactions = await msg2.awaitReactions(reaction => reaction.emoji.name == '✅' || reaction.emoji.name == '????', {time: 86400000, max: 1});
let reaction = await reactions.first();
if (reaction.emoji.name === '✅') {
await msg2.delete();
await msg.author.send(`Your order was completed. Please come to the pharmacy with $ ${howmany}000`);
return;
};
if (reaction.emoji.name === '????') {
await msg2.delete();
await msg.author.send(`Your order has been delayed, please message Pixel for info.`);
return;
};
};
【问题讨论】:
标签: discord.js