Update sys lvl

This commit is contained in:
*x1
2024-06-13 13:40:03 +02:00
parent f0245f0533
commit 95c57b6b29
+2 -2
View File
@@ -43,8 +43,8 @@ module.exports = {
if (user.xp >= 100 * user.lvl) {
db.run(
`UPDATE users SET xp = 0, lvl = lvl + 1, pocket = pocket + ?, reputation = reputation + ? WHERE guildId = ? AND userId = ?`,
[user.lvl + 1, Math.ceil((user.lvl + 1) / 5), message.guild.id, message.author.id]
`UPDATE users SET xp = xp - ?, lvl = lvl + 1, pocket = pocket + ?, reputation = reputation + ? WHERE guildId = ? AND userId = ?`,
[100 * user.lvl, user.lvl + 1, Math.ceil((user.lvl + 1) / 5), message.guild.id, message.author.id]
);
const embedlvl = new EmbedBuilder()