Added dice.

This commit is contained in:
2022-10-24 00:25:13 +02:00
parent 32034b7b6f
commit ef5b6ad856
3 changed files with 43 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
const config = require('config');
const style = require('./style');
function getLeaders(points, user, ping = false) {
function getLeaders(points, user, ping = true) {
return Object.entries(points).sort(([, scoreA], [, scoreB]) => scoreB - scoreA).map(([userKey, score], index) => {
const username = userKey.split(':')[1] || userKey; // process the points file