mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Add WPM to typing-race/typing-test
This commit is contained in:
@@ -59,8 +59,9 @@ module.exports = class TypingRaceCommand extends Command {
|
||||
}
|
||||
this.client.games.delete(msg.channel.id);
|
||||
if (!winner.size) return msg.say('Oh... No one won.');
|
||||
const wpm = (sentence.length / 5) / ((newScore / 1000) / 60);
|
||||
return msg.say(stripIndents`
|
||||
The winner is ${winner.first().author}! (Took ${newScore / 1000} seconds)
|
||||
The winner is ${winner.first().author}! (Took ${newScore / 1000} seconds, ${wpm} WPM)
|
||||
${scoreBeat ? `**New High Score!** Old:` : `High Score:`} ${highScore / 1000} (Held by ${user})
|
||||
`);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user