mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 06:34:58 +05:00
Первое место, а не нулевое
This commit is contained in:
parent
51fa063332
commit
b094ba882c
1 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ class Leaderboard extends Command {
|
||||||
const members = await this.client.membersData.find({ guildID: message.guild.id }).lean(),
|
const members = await this.client.membersData.find({ guildID: message.guild.id }).lean(),
|
||||||
membersLeaderboard = members.map((m) => {
|
membersLeaderboard = members.map((m) => {
|
||||||
return {
|
return {
|
||||||
id: m.id,
|
id: m.id + 1,
|
||||||
value: m.money + m.bankSold
|
value: m.money + m.bankSold
|
||||||
};
|
};
|
||||||
}).sort((a,b) => b.value - a.value);
|
}).sort((a,b) => b.value - a.value);
|
||||||
|
@ -40,7 +40,7 @@ class Leaderboard extends Command {
|
||||||
const members = await this.client.membersData.find({ guildID: message.guild.id }).lean(),
|
const members = await this.client.membersData.find({ guildID: message.guild.id }).lean(),
|
||||||
membersLeaderboard = members.map((m) => {
|
membersLeaderboard = members.map((m) => {
|
||||||
return {
|
return {
|
||||||
id: m.id,
|
id: m.id + 1,
|
||||||
value: m.level
|
value: m.level
|
||||||
};
|
};
|
||||||
}).sort((a,b) => b.value - a.value);
|
}).sort((a,b) => b.value - a.value);
|
||||||
|
@ -53,7 +53,7 @@ class Leaderboard extends Command {
|
||||||
const users = await this.client.usersData.find().lean(),
|
const users = await this.client.usersData.find().lean(),
|
||||||
usersLeaderboard = users.map((u) => {
|
usersLeaderboard = users.map((u) => {
|
||||||
return {
|
return {
|
||||||
id: u.id,
|
id: u.id + 1,
|
||||||
value: u.rep
|
value: u.rep
|
||||||
};
|
};
|
||||||
}).sort((a,b) => b.value - a.value);
|
}).sort((a,b) => b.value - a.value);
|
||||||
|
|
Loading…
Reference in a new issue