docs: fix readme example
This commit is contained in:
parent
86d9590d11
commit
626f3d0725
|
@ -18,11 +18,11 @@ See the [GAMES_LIST.md](GAMES_LIST.md) file for the currently supported titles,
|
||||||
## Usage from Node.js
|
## Usage from Node.js
|
||||||
Install using your favorite package manager: `npm install gamedig`, then use!
|
Install using your favorite package manager: `npm install gamedig`, then use!
|
||||||
```js
|
```js
|
||||||
import GameDig from 'gamedig';
|
import { GameDig } from 'gamedig';
|
||||||
|
|
||||||
GameDig.query({
|
GameDig.query({
|
||||||
type: 'minecraft',
|
type: 'minecraft',
|
||||||
host: 'mc.example.com'
|
host: 'mc.hypixel.net'
|
||||||
}).then((state) => {
|
}).then((state) => {
|
||||||
console.log(state);
|
console.log(state);
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
|
Loading…
Reference in New Issue