From 72789e644f04c4e2e8509669a58d72ae1181994d Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Tue, 10 Jan 2023 20:09:36 +0100 Subject: [PATCH] fix inconsistencies --- commands/message/core/stats.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/message/core/stats.js b/commands/message/core/stats.js index 4cb9ce0..153ce77 100644 --- a/commands/message/core/stats.js +++ b/commands/message/core/stats.js @@ -15,21 +15,22 @@ module.exports = { usage: 'stats' }, run: async (context) => { + context.triggerTyping(); try{ let stats = await getCommandStatistics(); let pages = []; - num = 0; + let ranking = 1; for (var i = 0; i < Object.keys(stats).length; i += 20) { list = [] if(pages.length == 0){list.push(` | Total - ${Object.values(stats).reduce((a, b) => a + b, 0)}`)} Object.keys(stats).forEach(function(elem){ - dispnum = `${num}` - if(`${num}`.length == 1){dispnum = ` ${num}`} + dispnum = `${ranking}` + if(`${ranking}`.length == 1){dispnum = ` ${ranking}`} list.push(`${dispnum} | ${elem} - ${stats[elem]}`) - num++ + ranking++ }) pages.push({embeds:[