Prevent rapid execution of commands

This commit is contained in:
7cc5c4f330d47060 2024-07-16 09:59:37 -04:00
parent dace4321ae
commit 59ae343117

View file

@ -10,7 +10,8 @@ module.exports={
b.lastCmd=0;
b.runCommand=(name, uuid, text)=>{
if(Date.now-b.lastCmd<=1000){
console.log("Executed too early, "+(Date.now-b.lastCmd)+"ms left")
console.log("Executed too early, "+(Date.now-b.lastCmd)+"ms left");
return;
}
const cmd=text.split(" ");
if(cmds[cmd[0].toLowerCase()]){