diff --git a/src/app.js b/src/app.js index 83407e1..406508d 100644 --- a/src/app.js +++ b/src/app.js @@ -72,7 +72,8 @@ async function setPoints(defaultKey, user, value, { mode = 'add', key } = {}) { await fs.writeFile(`./points-${instance}.json`, JSON.stringify(points, null, 4)); } -function getPoints(game, username, { user, room, command }) { +function getPoints(game, rawUsername, { user, room, command }) { + const username = rawUsername?.replace(/^@/, ''); const gamePoints = points[command] || points[game.key]; const userPoints = username