User: Fix type mismatch causing xp passed as a string to be appended

instead of being added as an increment.
This commit is contained in:
2022-09-12 03:58:51 +02:00
parent ed7096fac0
commit 9106192fd5

View File

@@ -18,7 +18,7 @@ module.exports = (sequelize, DataTypes) => {
async addExperience(amount) {
console.log(`Adding ${amount} experience to user ${this.id}`);
await this.update({
experience: this.experience + amount
experience: this.experience + parseInt(amount)
});
}
async getLevel() {