You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consttest1={host: 'play.alliummc.org',port: 25565,timeout: 5000};//expected: Status & Query
consttest2={host: '129.146.217.25',port: 25565};//expected: Status only
constcurrentTest=test1;
/*
you have to explicitly catch promise rejections when awaiting query and status, since any error is forwarded, be it connection, timeout or other expected or unexpected ones.
you can await or then().
*/
(asyncfunction(){
try{
letinfo=awaitqueryFullStat(currentTest);
console.log(info);
}catch(err){
console.log('FullStat Query threw an error:\n\n'+err);
}
})();
serverStatus(currentTest)
.then((data)=>{
console.log(data);
})
.catch((err)=>{
console.log('Status Query threw an error:\n\n'+err)