From f4a872546a84b6f5a9d10da1f8f9ec83558f746d Mon Sep 17 00:00:00 2001 From: Dennis Heinrich Date: Sun, 8 Dec 2024 02:29:17 +0100 Subject: [PATCH 1/2] Removed the display of the game server month due to incorrect values, this must me reimplemented when more details about this is available #2 --- source/Services/DiscordEmbed.ts | 2 -- source/Services/ServerStatusFeed.ts | 33 +---------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/source/Services/DiscordEmbed.ts b/source/Services/DiscordEmbed.ts index 7309715..3c8df1d 100644 --- a/source/Services/DiscordEmbed.ts +++ b/source/Services/DiscordEmbed.ts @@ -100,8 +100,6 @@ export default class DiscordEmbed { let embed = new EmbedBuilder(); let config = this.appConfiguration; - serverStats.getServerMonth(); - embed.setTitle(config.translation.discordEmbed.title); if (!serverStats.isOnline()) { embed.setColor(0xCA0000); diff --git a/source/Services/ServerStatusFeed.ts b/source/Services/ServerStatusFeed.ts index 61f43a7..73f3849 100644 --- a/source/Services/ServerStatusFeed.ts +++ b/source/Services/ServerStatusFeed.ts @@ -137,37 +137,6 @@ export default class ServerStatusFeed { }); } - /** - * Returns the server month as a string - * @returns {string} The server month as a string - */ - public getServerMonth(): string { - let config: IConfiguration = Configuration.getConfiguration(); - let dayTime = this.getServerStats()?.Server.dayTime; - if (dayTime === undefined) { - return "Error"; - } - let month = dayTime / (60 * 60 * 1000 * 24); - month = month % 1; - month = month * 12; - month = Math.floor(month); - let months = [ - config.translation.common.monthJanuary, - config.translation.common.monthFebruary, - config.translation.common.monthMarch, - config.translation.common.monthApril, - config.translation.common.monthMay, - config.translation.common.monthJune, - config.translation.common.monthJuly, - config.translation.common.monthAugust, - config.translation.common.monthSeptember, - config.translation.common.monthOctober, - config.translation.common.monthNovember, - config.translation.common.monthDecember - ] - return months[month-1]; - } - /** * Returns the server time in the format HH:MM * @returns {string} The server time in the format HH:MM @@ -187,7 +156,7 @@ export default class ServerStatusFeed { if(minutesString.length === 1) { minutesString = `0${minutesString}`; } - return `${hoursString}:${minutesString} (${this.getServerMonth()})`; + return `${hoursString}:${minutesString}`; } /** From 885461f316db515aac6750710f0674157c5f65c0 Mon Sep 17 00:00:00 2001 From: Dennis Heinrich Date: Sun, 8 Dec 2024 02:29:52 +0100 Subject: [PATCH 2/2] Changed version to 0.1.7 (temporarily bugfix) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ed0409..8ff7347 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ls25-discord-bot", - "version": "0.1.6", + "version": "0.1.7", "description": "A simple discord bot for farming simulator 25", "main": "source/Main.ts", "scripts": {