2023-10-21 23:29:20 +00:00
|
|
|
import { pingBedrock } from '../index.js';
|
|
|
|
|
2023-10-22 18:32:00 +00:00
|
|
|
const hosts = [
|
|
|
|
'play.timecrack.net',
|
|
|
|
'geo.hivebedrock.network',
|
|
|
|
'oasys-pe.com',
|
|
|
|
'play.galaxite.net',
|
|
|
|
];
|
|
|
|
|
|
|
|
const pingPromises = hosts.map(host => pingBedrock(host));
|
|
|
|
const results = await Promise.allSettled(pingPromises);
|
|
|
|
|
|
|
|
for (let result of results) {
|
|
|
|
if (result.status === 'rejected') {
|
|
|
|
console.error(result.reason);
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(result.value);
|
|
|
|
}
|