diff --git a/src/game-server.ts b/src/game-server.ts index 57f8f3d..17ea558 100644 --- a/src/game-server.ts +++ b/src/game-server.ts @@ -1,7 +1,5 @@ import axios from 'axios'; -import { Player, QueryResult, Type } from 'gamedig'; -// @ts-ignore -import { GameDig } from 'gamedig'; +import { GameDig, Player, QueryResult } from 'gamedig'; import { Low, JSONFile } from '@commonify/lowdb'; import ipRegex from './lib/ipregex.js'; import getIP from './lib/getip.js'; @@ -47,11 +45,10 @@ export interface Info { interface qRes extends QueryResult { game: string; - numplayers: number; } export interface QueryOptions { - type: Type; + type: string; host: string; port: number; maxRetries?: number; diff --git a/src/server.ts b/src/server.ts index f536ce0..406b9a8 100644 --- a/src/server.ts +++ b/src/server.ts @@ -3,7 +3,6 @@ import path from 'node:path'; import crypto from 'node:crypto'; import { createServer } from 'node:http'; import { URL } from 'node:url'; -// @ts-ignore import { games, protocols } from 'gamedig'; import 'dotenv/config'; import { GameServerConfig, main, readConfig, updateConfig } from './watcher.js'; diff --git a/src/watcher.ts b/src/watcher.ts index c2b2333..875dc1d 100644 --- a/src/watcher.ts +++ b/src/watcher.ts @@ -1,4 +1,3 @@ -import { Type } from 'gamedig'; import { Low, JSONFile } from '@commonify/lowdb'; import { GameServer, initDb, saveDb } from './game-server.js'; import * as discordBot from './discord-bot.js'; @@ -43,7 +42,7 @@ export interface GameServerConfig { telegram?: TelegramConfig[]; slack?: SlackConfig[]; // node-gamedig stuff - type: Type; + type: string; host: string; port: number; givenPortOnly?: boolean;