mirror of
https://github.com/cloudmaker97/FS25-Discord-Bot.git
synced 2025-12-06 00:18:34 +00:00
Removed the display of the game server month due to incorrect values, this must me reimplemented when more details about this is available #2
This commit is contained in:
parent
c2380609b2
commit
f4a872546a
2 changed files with 1 additions and 34 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue