Minetrack/lib/util.js

12 lines
165 B
JavaScript
Raw Normal View History

2023-12-30 23:03:54 +00:00
function getPlayerCountOrNull(resp) {
if (resp) {
2023-12-30 23:03:54 +00:00
return resp.players.online;
} else {
2023-12-30 23:03:54 +00:00
return null;
}
}
module.exports = {
2023-12-30 23:03:54 +00:00
getPlayerCountOrNull,
};