您好试图在执行命令时向在线成员发送pm,但我无法真正使它按我的意愿工作。
Client.on('message', (message) => {
if(message.content === config.prefix + "play") {
let onlineMembers = message.guild.members.filter(member => member.presence.status === "online") //only green status
console.log(onlineMembers)
for (let i = 0; i < onlineMembers; i++) {
onlineMembers[i]
}
}
任何人都知道如何做到这一点?