mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2025-02-01 03:19:41 +11:00
Janky fix for console flood when incrementing levels
This commit is contained in:
parent
d5146b5c25
commit
77e07b7c28
@ -23,8 +23,8 @@ export default class userLevels extends Schema {
|
||||
await this._content.findByIdAndUpdate(userid, {messages: userData.messages + 1});
|
||||
if (userData.messages >= this.algorithm(userData.level+2)){
|
||||
while (userData.messages > this.algorithm(userData.level+1)){
|
||||
const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level+1}, {new: true});
|
||||
console.log(`${userid} EXTENDED LEVELUP ${newData?.level}`)
|
||||
const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level++}, {new: true});
|
||||
console.log(`${userid} extended to level ${newData.level}`);
|
||||
}
|
||||
} else if (userData.messages >= this.algorithm(userData.level+1)) {
|
||||
const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level+1}, {new: true});
|
||||
|
Loading…
x
Reference in New Issue
Block a user