2023-11-20 10:35:31 +01:00
|
|
|
import { GameDig } from '../lib/index.js'
|
2023-10-30 22:35:39 +01:00
|
|
|
// Instead of '../lib/index.js' you would have here 'gamedig'.
|
|
|
|
|
|
|
|
GameDig.query({
|
|
|
|
type: 'minecraft',
|
|
|
|
host: 'mc.hypixel.net'
|
|
|
|
}).then((state) => {
|
|
|
|
console.log(state)
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(`Server is offline, error: ${error}`)
|
|
|
|
})
|