1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00

Add timestamp to silent levelup notification

This commit is contained in:
Toast 2023-06-02 20:23:29 +10:00
parent e2c9d0c377
commit 97090b1cc3

View File

@ -24,7 +24,7 @@ export default class userLevels extends Schema {
if (userData.messages >= this.algorithm(userData.level+2)){ if (userData.messages >= this.algorithm(userData.level+2)){
while (userData.messages > this.algorithm(userData.level+1)){ while (userData.messages > this.algorithm(userData.level+1)){
const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level++}, {new: true}); const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level++}, {new: true});
console.log(`${userid} extended to level ${newData.level}`); console.log(this.client.logTime(), `${userid} extended to level ${newData.level}`);
} }
} else if (userData.messages >= this.algorithm(userData.level+1)) { } else if (userData.messages >= this.algorithm(userData.level+1)) {
const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level+1}, {new: true}); const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level+1}, {new: true});