【发布时间】:2020-08-01 23:37:49
【问题描述】:
为什么它给我这个错误?如何定义表情符号? IT 应该只检查反应是否与那个表情符号有关。
.then(function (message, reaction) {
message.react("????")
message.react("????")
const filter = (reaction, user) => {
return ['????', 'B'].includes(reaction.emoji.name) && user.id === message.author.id;
};
message.awaitReactions(filter, { max: 1 })
.then(collected => {
if (reaction.emoji.name === '????') {
message.channel.send('Ok, so you want to buy a server. Let me recommend you to visit <#699374469977735208>.');
}
else {
message.channel.send('Ok, so you need more informations first. Let me recommend you to visit <#699374469977735208>.');
}
})
});
【问题讨论】:
标签: javascript bots discord.js emoji defined