From 6867850c7409d2ee9ac2d8f85da8e182ab5dae08 Mon Sep 17 00:00:00 2001 From: hossammenem <88946630+hossammenem@users.noreply.github.com> Date: Wed, 4 Jan 2023 15:23:47 +0200 Subject: [PATCH] adding the WPM to the daily leaderboard message (#3838) hossammenem * adding the WPM to the daily leaderboard message * rounding the WPM --- backend/src/jobs/announce-daily-leaderboards.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/jobs/announce-daily-leaderboards.ts b/backend/src/jobs/announce-daily-leaderboards.ts index 2ed0d6368..1aef0f298 100644 --- a/backend/src/jobs/announce-daily-leaderboards.ts +++ b/backend/src/jobs/announce-daily-leaderboards.ts @@ -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",