Fix command rate limit

This commit is contained in:
7cc5c4f330d47060 2024-07-23 16:38:57 -04:00
parent 60adce4891
commit 9817191d27

View file

@ -13,10 +13,8 @@ module.exports={
b.lastCmd=0;
b.runCommand=(name, uuid, text, prefix)=>{
if(uuid=="00000000-0000-0000-0000-000000000000") return;
if(Date.now-b.lastCmd<=1000){
console.log("Executed too early, "+(Date.now-b.lastCmd)+"ms left");
return;
}
if(Date.now()-b.lastCmd<=1000) return;
b.lastCmd=Date.now();
const cmd=text.split(" ");
let lang=settings.defaultLang;
let verify=hashcheck(cmd);