adding the WPM to the daily leaderboard message (#3838) hossammenem

* adding the WPM to the daily leaderboard message

* rounding the WPM
This commit is contained in:
hossammenem 2023-01-04 15:23:47 +02:00 committed by GitHub
parent 3d4b28f864
commit 6867850c74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,6 +61,7 @@ async function announceDailyLeaderboard(
allResults.forEach((entry) => {
const rank = entry.rank ?? maxResults;
const wpm = Math.round(entry.wpm);
const placementString = getOrdinalNumberString(rank);
@ -81,7 +82,7 @@ async function announceDailyLeaderboard(
const rewardMail = buildMonkeyMail({
subject: "Daily leaderboard placement",
body: `Congratulations ${entry.name} on placing ${placementString} in the ${language} ${mode} ${mode2} daily leaderboard!`,
body: `Congratulations ${entry.name} on placing ${placementString} with ${wpm} wpm in the ${language} ${mode} ${mode2} daily leaderboard!`,
rewards: [
{
type: "xp",