Skip to content

Commit

Permalink
Update status.js
Browse files Browse the repository at this point in the history
Fixed string output
  • Loading branch information
IDBEHOLDV committed Dec 23, 2024
1 parent 7728e56 commit 2e10607
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/hooks/discordBot/commands/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ const Status = {
// manage next horde day
let hordeMessage;
if (daysUntilHorde < 0) {
hordeMessage = "The horde has already started.";
hordeMessage = "has already started.";

Check warning on line 64 in api/hooks/discordBot/commands/status.js

View check run for this annotation

Codecov / codecov/patch

api/hooks/discordBot/commands/status.js#L64

Added line #L64 was not covered by tests
} else if (daysUntilHorde === 0) {
hordeMessage = "The horde is coming tonight.";
hordeMessage = "is coming tonight.";

Check warning on line 66 in api/hooks/discordBot/commands/status.js

View check run for this annotation

Codecov / codecov/patch

api/hooks/discordBot/commands/status.js#L66

Added line #L66 was not covered by tests
} else {
hordeMessage = `${daysUntilHorde} days`;
hordeMessage = `in ${daysUntilHorde} days`;

Check warning on line 68 in api/hooks/discordBot/commands/status.js

View check run for this annotation

Codecov / codecov/patch

api/hooks/discordBot/commands/status.js#L68

Added line #L68 was not covered by tests
}

let embed = new client.customEmbed();
Expand All @@ -77,7 +77,7 @@ const Status = {
},
{
name: `Gametime`, value: `${serverInfo.stats.gametime.days} days ${serverInfo.stats.gametime.hours} hours ${serverInfo.stats.gametime.minutes} minutes
Next horde in ${bloodMoonDay ? hordeMessage : `unknown`}`
Next horde ${bloodMoonDay ? hordeMessage : `unknown`}`
},
{ name: `${serverInfo.stats.hostiles} hostiles`, value: `${serverInfo.stats.animals} animals` },
{ name: `${serverInfo.stats.players} players online`, value: onlinePlayersStringList.length > 0 ? onlinePlayersStringList : 'None' },
Expand All @@ -99,4 +99,4 @@ const Status = {
}
};

module.exports = Status;
module.exports = Status;

0 comments on commit 2e10607

Please sign in to comment.