mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 16:19:12 +02:00
Fix
This commit is contained in:
@@ -26,9 +26,10 @@ module.exports = class CommandLeaderboardCommand extends Command {
|
|||||||
let i = 0;
|
let i = 0;
|
||||||
const list = this.client.registry.commands
|
const list = this.client.registry.commands
|
||||||
.filter(cmd => !isNaN(cmd.uses))
|
.filter(cmd => !isNaN(cmd.uses))
|
||||||
.sort((a, b) => a.uses - b.uses)
|
.sort((a, b) => b.uses - a.uses)
|
||||||
.map(cmd => `**${++i}.** ${cmd.name} (${cmd.uses} Uses)`)
|
.map(cmd => `**${++i}.** ${cmd.name} (${cmd.uses} Uses)`)
|
||||||
.slice((page - 1) * 10, page * 10);
|
.slice((page - 1) * 10, page * 10);
|
||||||
|
if (!list.length) return msg.say('This page does not exist.');
|
||||||
return msg.say(list.join('\n'));
|
return msg.say(list.join('\n'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user