我正在尝试在DM通道中创建消息收集器,但它不会收集任何消息。 这是我的代码:
member.createDM().then(channel => {
const filter = m => !m.author.bot;
const collector = channel.createMessageCollector(filter, { max: 1, time: 10000 });
collector.on('collect', msg => {
if (msg == text) {
let success = new MessageEmbed()
.setDescription("You have successfully been verified!")
channel.send(success)
} else {
console.log(msg)
}
});
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
})