add username gamedig option to support palworld

This commit is contained in:
Smith
2024-06-15 10:23:59 +02:00
parent 78602a9554
commit 7ef49223f3
5 changed files with 159 additions and 563 deletions

705
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "game-server-watcher",
"version": "3.1.14",
"version": "3.1.15",
"description": "A simple discord/telegram/slack bot that can be hosted on a free service to monitor your game servers and players in style. 😎",
"exports": "./dist/server.js",
"type": "module",

View File

@@ -289,7 +289,7 @@
}
},
"password": {
"title": "password (Nadeo)",
"title": "password (Nadeo / Palworld)",
"type": "string",
"options": {
"grid_columns": 3
@@ -301,6 +301,13 @@
"options": {
"grid_columns": 3
}
},
"username": {
"title": "username (Palworld)",
"type": "string",
"options": {
"grid_columns": 3
}
}
},
"format": "grid-strict",

View File

@@ -96,7 +96,8 @@ export class GameServer {
login: this.config.login,
password: this.config.password,
teamspeakQueryPort: this.config.teamspeakQueryPort,
token: this.config.token
token: this.config.token,
username: this.config.username
} as QueryOptions);
const raw = res.raw as { game?: string; folder?: string; presence_count?: number; };

View File

@@ -56,11 +56,14 @@ export interface GameServerConfig {
guildId?: string;
// Nadeo
login?: string;
// Nadeo / Palworld
password?: string;
// Teamspeak 3
teamspeakQueryPort?: number;
// Terraria
token?: string;
// Palworld
username?: string;
}
const db = await JSONPreset<GameServerConfig[]>(DATA_PATH + 'default.config.json', []);