mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-16 08:48:32 +01:00
12 lines
283 B
JavaScript
12 lines
283 B
JavaScript
|
import GameDig from '../lib/index.js'
|
||
|
// 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}`)
|
||
|
})
|