Skip to content

Commit

Permalink
fix bug when graph doesn't generate after 23:00
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhaillav authored Jul 20, 2023
1 parent 3d10622 commit c512a59
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ client.once(Events.ClientReady, async (c) => {
});
setInterval(async () => {
let now = new Date();
if (now.getHours() - time[time.length - 1].split(":")[0] > 0) {
if (now.getHours() != time[time.length - 1].split(":")[0]) {
await statusMessage.edit({
embeds: [await generateStatusEmbed(true)],
});
Expand Down Expand Up @@ -139,9 +139,6 @@ async function generateStatusEmbed(update_graph = false) {
if (mins.length === 1) {
mins = "0" + mins;
}
if (hours.length === 1) {
hours = "0" + hours;
}
time.push(`${hours}:${mins}`);
online.push(state.players.length);

Expand Down

0 comments on commit c512a59

Please sign in to comment.