mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
fix inconsistencies
This commit is contained in:
parent
8bf8516f84
commit
72789e644f
1 changed files with 5 additions and 4 deletions
|
@ -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:[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue