mirror of
https://github.com/cloudmaker97/FS25-Discord-Bot.git
synced 2025-12-06 08:28:33 +00:00
Small preparations for the game update feed in a separate channel
This commit is contained in:
parent
4e6668c2e5
commit
bdd33df0eb
4 changed files with 12 additions and 6 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
export default interface IDiscordConfiguration {
|
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;
|
botToken: string;
|
||||||
}
|
}
|
||||||
|
|
@ -7,7 +7,7 @@ import Logging from "./Logging";
|
||||||
export default class DiscordEmbed {
|
export default class DiscordEmbed {
|
||||||
private appLogger: Logger;
|
private appLogger: Logger;
|
||||||
private discordAppClient: Client;
|
private discordAppClient: Client;
|
||||||
private appConfiguration: Configuration;
|
private readonly appConfiguration: Configuration;
|
||||||
private serverStatsFeed: ServerStatusFeed;
|
private serverStatsFeed: ServerStatusFeed;
|
||||||
private firstMessageId: Snowflake | null = null;
|
private firstMessageId: Snowflake | null = null;
|
||||||
|
|
||||||
|
|
|
||||||
9
source/Services/GameUpdateFeed.ts
Normal file
9
source/Services/GameUpdateFeed.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import Configuration from "./Configuration";
|
||||||
|
|
||||||
|
export default class GameUpdateFeed {
|
||||||
|
private readonly appConfiguration: Configuration;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.appConfiguration = new Configuration();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,7 +3,6 @@ import Configuration from "./Configuration";
|
||||||
import {XMLParser} from "fast-xml-parser";
|
import {XMLParser} from "fast-xml-parser";
|
||||||
import Logging from "./Logging";
|
import Logging from "./Logging";
|
||||||
import IPlayer from "../Interfaces/Feed/IPlayer";
|
import IPlayer from "../Interfaces/Feed/IPlayer";
|
||||||
import IConfiguration from "../Interfaces/Configuration/IConfiguration";
|
|
||||||
import IMod from "../Interfaces/Feed/IMod";
|
import IMod from "../Interfaces/Feed/IMod";
|
||||||
|
|
||||||
export const CONNECTION_REFUSED = 'ECONNREFUSED';
|
export const CONNECTION_REFUSED = 'ECONNREFUSED';
|
||||||
|
|
@ -14,9 +13,6 @@ export default class ServerStatusFeed {
|
||||||
private _isOnline: boolean = false;
|
private _isOnline: boolean = false;
|
||||||
private _isFetching: boolean = false;
|
private _isFetching: boolean = false;
|
||||||
|
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the fetching status of the server stats feed
|
* Returns the fetching status of the server stats feed
|
||||||
* @returns {boolean} The fetching status of the server stats feed
|
* @returns {boolean} The fetching status of the server stats feed
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue