我是不和谐js的新手。我有一个“hack”命令(这是一个笑话命令)它“黑客”你标记的人。(prefix)hack @user
代码如下:
execute(message, args){
function wait(ms){
let start = new Date().getTime();
let end = start;
while(end < start + ms) {
end = new Date().getTime();
}
}
const taggedUser = message.mentions.users.first();
if (taggedUser.bot) {
return message.channel.send('People live and learn... but you just live');
}
message.channel.send(`Hacking ${taggedUser}...`);
message.channel.send('Status: 0%')
.then(msg => {
wait(93);
msg.edit('Status: 7%');
wait(100);
msg.edit('Status: 8%');
wait(20)
msg.edit('Status: 9%');
wait(90);
msg.edit('Status: 12%');
wait(60);
msg.edit('Status: 14%');
wait(60);
msg.edit('Status: 17%');
wait(40);
msg.edit('Status: 20%');
wait(10);
msg.edit('Status: 21%');
wait(12);
msg.edit('Status: 22%');
wait(13);
msg.edit('Status: 24%');
wait(80);
msg.edit('Status: 29%');
wait(80);
msg.edit('Status: 31%');
wait(80);
msg.edit('Status: 36%');
wait(40);
msg.edit('Status: 41%');
wait(60);
msg.edit('Status: 47%');
wait(50);
msg.edit('Status: 53%');
wait(35);
msg.edit('Status: 100%').then(() => {
message.channel.send(`Succesfuly hacked ${taggedUser}.\n**I just sent you a text file to your DM with his IP and the password to remotly control his computer**`);
})
})
},
问题是,当我尝试同时破解两个人时(我发送两次命令),它开始更改第一个人的状态,但第二个人直到另一个人达到100%才开始改变。
汪汪一只猫
一只名叫tom的猫
相关分类