代码:
client.on("message", message => {
if (message.author.id !== "my id") || message.author.id !== "my friend id") return message.delete();
首先,你应该格式化你的代码,其次,这里是你应该使用的代码:
client.on('message', msg => {
if(msg.author.id === 'id' || msg.author.id === 'id') {
//code to run
} else {
return msg.delete();
}
})
使用数组:
let users = ['your id', 'your friend's id'];
if(users.includes(message.author.id)){
// your code goes here
}
else {
return msg.delete();
}