1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-25 23:15:38 -05:00

Add timestamp to silent levelup notification

This commit is contained in:
Toast 2023-06-02 20:23:29 +10:00
parent 1d248554d1
commit ae53d11947

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});