mirror of
https://github.com/a-sync/game-server-watcher.git
synced 2026-07-31 01:28:18 -04:00
upd. gamedig types to v5
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user