mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 23:23:08 -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'
|
usage: 'stats'
|
||||||
},
|
},
|
||||||
run: async (context) => {
|
run: async (context) => {
|
||||||
|
context.triggerTyping();
|
||||||
try{
|
try{
|
||||||
let stats = await getCommandStatistics();
|
let stats = await getCommandStatistics();
|
||||||
|
|
||||||
let pages = [];
|
let pages = [];
|
||||||
num = 0;
|
let ranking = 1;
|
||||||
|
|
||||||
for (var i = 0; i < Object.keys(stats).length; i += 20) {
|
for (var i = 0; i < Object.keys(stats).length; i += 20) {
|
||||||
list = []
|
list = []
|
||||||
if(pages.length == 0){list.push(` | Total - ${Object.values(stats).reduce((a, b) => a + b, 0)}`)}
|
if(pages.length == 0){list.push(` | Total - ${Object.values(stats).reduce((a, b) => a + b, 0)}`)}
|
||||||
|
|
||||||
Object.keys(stats).forEach(function(elem){
|
Object.keys(stats).forEach(function(elem){
|
||||||
dispnum = `${num}`
|
dispnum = `${ranking}`
|
||||||
if(`${num}`.length == 1){dispnum = ` ${num}`}
|
if(`${ranking}`.length == 1){dispnum = ` ${ranking}`}
|
||||||
list.push(`${dispnum} | ${elem} - ${stats[elem]}`)
|
list.push(`${dispnum} | ${elem} - ${stats[elem]}`)
|
||||||
num++
|
ranking++
|
||||||
})
|
})
|
||||||
|
|
||||||
pages.push({embeds:[
|
pages.push({embeds:[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue