mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-21 13:06:01 +08:00
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:
parent
3d4b28f864
commit
6867850c74
1 changed files with 2 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue