Small preparations for the game update feed in a separate channel

This commit is contained in:
Dennis Heinrich 2024-12-28 23:01:33 +01:00
parent 4e6668c2e5
commit bdd33df0eb
4 changed files with 12 additions and 6 deletions

View file

@ -1,4 +1,5 @@
export default interface IDiscordConfiguration {
channelId: string;
channelId: string; // Is meant for the game status display
gameUpdateChannelId: string|null; // Is meant for updates like bought fields, but is optional
botToken: string;
}

View file

@ -7,7 +7,7 @@ import Logging from "./Logging";
export default class DiscordEmbed {
private appLogger: Logger;
private discordAppClient: Client;
private appConfiguration: Configuration;
private readonly appConfiguration: Configuration;
private serverStatsFeed: ServerStatusFeed;
private firstMessageId: Snowflake | null = null;

View file

@ -0,0 +1,9 @@
import Configuration from "./Configuration";
export default class GameUpdateFeed {
private readonly appConfiguration: Configuration;
constructor() {
this.appConfiguration = new Configuration();
}
}

View file

@ -3,7 +3,6 @@ import Configuration from "./Configuration";
import {XMLParser} from "fast-xml-parser";
import Logging from "./Logging";
import IPlayer from "../Interfaces/Feed/IPlayer";
import IConfiguration from "../Interfaces/Configuration/IConfiguration";
import IMod from "../Interfaces/Feed/IMod";
export const CONNECTION_REFUSED = 'ECONNREFUSED';
@ -14,9 +13,6 @@ export default class ServerStatusFeed {
private _isOnline: boolean = false;
private _isFetching: boolean = false;
constructor() {
}
/**
* Returns the fetching status of the server stats feed
* @returns {boolean} The fetching status of the server stats feed