Skip to content

Commit bcc9851

Browse files
authored
Merge pull request #15 from cloudmaker97/change-time-display
2 parents 9fa2db3 + 885461f commit bcc9851

3 files changed

Lines changed: 2 additions & 35 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ls25-discord-bot",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "A simple discord bot for farming simulator 25",
55
"main": "source/Main.ts",
66
"scripts": {

source/Services/DiscordEmbed.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ export default class DiscordEmbed {
100100
let embed = new EmbedBuilder();
101101
let config = this.appConfiguration;
102102

103-
serverStats.getServerMonth();
104-
105103
embed.setTitle(config.translation.discordEmbed.title);
106104
if (!serverStats.isOnline()) {
107105
embed.setColor(0xCA0000);

source/Services/ServerStatusFeed.ts

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -137,37 +137,6 @@ export default class ServerStatusFeed {
137137
});
138138
}
139139

140-
/**
141-
* Returns the server month as a string
142-
* @returns {string} The server month as a string
143-
*/
144-
public getServerMonth(): string {
145-
let config: IConfiguration = Configuration.getConfiguration();
146-
let dayTime = this.getServerStats()?.Server.dayTime;
147-
if (dayTime === undefined) {
148-
return "Error";
149-
}
150-
let month = dayTime / (60 * 60 * 1000 * 24);
151-
month = month % 1;
152-
month = month * 12;
153-
month = Math.floor(month);
154-
let months = [
155-
config.translation.common.monthJanuary,
156-
config.translation.common.monthFebruary,
157-
config.translation.common.monthMarch,
158-
config.translation.common.monthApril,
159-
config.translation.common.monthMay,
160-
config.translation.common.monthJune,
161-
config.translation.common.monthJuly,
162-
config.translation.common.monthAugust,
163-
config.translation.common.monthSeptember,
164-
config.translation.common.monthOctober,
165-
config.translation.common.monthNovember,
166-
config.translation.common.monthDecember
167-
]
168-
return months[month-1];
169-
}
170-
171140
/**
172141
* Returns the server time in the format HH:MM
173142
* @returns {string} The server time in the format HH:MM
@@ -187,7 +156,7 @@ export default class ServerStatusFeed {
187156
if(minutesString.length === 1) {
188157
minutesString = `0${minutesString}`;
189158
}
190-
return `${hoursString}:${minutesString} (${this.getServerMonth()})`;
159+
return `${hoursString}:${minutesString}`;
191160
}
192161

193162
/**

0 commit comments

Comments
 (0)