execute(message, args){
message.channel.send(message.author.username + ' has started a dungeon party! React with your class to join.').then(messageReaction => {
messageReaction.react("⚔️");
messageReaction.react("?");
messageReaction.react("❤️");
messageReaction.react("?️");
messageReaction.react("?");
const filter = (reaction) => {
return reaction.emoji.name === '⚔️'
};
const collector = message.createReactionCollector(filter, { time: 15000 });
collector.on('collect', (reaction, user) => {
message.channel.send(user.tag + ' has joined ' + message.author.username + '\'s\ party as a beserker!');
});
collector.on('end', collected => {
console.log(`Collected ${collected.size} items`);
});
});
},
}
显示五个表情符号,但是当我用剑一个做出反应时,似乎什么也没有发生。不过,它确实会在最后登录控制台。 对于那些好奇的人,我只是开始编码,然后尝试通过实践/实际编码学习。不过,这可能有些愚蠢。