upd. gamedig types to v5

This commit is contained in:
Smith
2024-01-22 11:33:38 +01:00
parent 03b307f938
commit 87152ff4c9
3 changed files with 3 additions and 8 deletions

View File

@@ -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;

View File

@@ -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';

View File

@@ -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;