Skip to content

Commit

Permalink
Refactor message generation in worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Niceygy committed Nov 11, 2023
1 parent 18af314 commit 2f0ebe5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ async function cron(env) {
}
repos.sort((a, b) => b.count - a.count); // Sort repos by count in descending order
let currentDate = new Date();
var message = "# Downloads as of " + currentDate.toUTCString() + "\n\n";
var message =+ repos.map(repo => `Repo: ${repo.name}, Count: ${repo.count}\n`).join("");
var message = "# Downloads as of " + currentDate.toUTCString() + "\n\n" + repos.map(repo => `Repo: ${repo.name}, Count: ${repo.count}\n`).join("");
console.log("Message generated. Sending to Discord...");
console.log(message);

Expand Down

0 comments on commit 2f0ebe5

Please sign in to comment.