show in profile how much xp needed for new level

This commit is contained in:
JonnyBro 2021-12-25 15:32:59 +05:00
parent 64794ba36a
commit 315954df14
2 changed files with 4 additions and 3 deletions

View file

@ -69,7 +69,7 @@ class Profile extends Command {
points: userData.rep
}), true)
.addField(message.translate("economy/profile:LEVEL"), `**${memberData.level}**`, true)
.addField(message.translate("economy/profile:EXP"), `**${memberData.exp}** xp`, true)
.addField(message.translate("economy/profile:EXP"), `**${memberData.exp}/${5 * (memberData.level * memberData.level) + 80 * memberData.level + 100}** xp`, true)
.addField(message.translate("economy/profile:REGISTERED"), message.printDate(new Date(memberData.registeredAt)), true)
.addField(message.translate("economy/profile:BIRTHDATE"), (!userData.birthdate ? message.translate("economy/profile:NO_BIRTHDATE"): message.printDate(new Date(userData.birthdate))), true)
.addField(message.translate("economy/profile:LOVER"), (!userData.lover ? message.translate("economy/profile:NO_LOVER") : this.client.users.cache.get(userData.lover).tag), true)

View file

@ -196,6 +196,7 @@ async function updateXp(msg, data) {
if (isInCooldown) {
if (isInCooldown > Date.now()) return;
};
// Records in the database the time when the member will be able to win xp again (1min)
const toWait = Date.now() + 60000;
xpCooldown[msg.author.id] = toWait;