mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 08:20:58 -05:00
Compare commits
No commits in common. "8ca48051f565c06cf6d92bca567dfd30b144f1c7" and "1d248554d1c15954ffe7d32c9ff185aa0de148ae" have entirely different histories.
8ca48051f5
...
1d248554d1
10
package.json
10
package.json
@ -29,15 +29,15 @@
|
|||||||
"discord.js": "14.11.0",
|
"discord.js": "14.11.0",
|
||||||
"moment": "2.29.4",
|
"moment": "2.29.4",
|
||||||
"ms": "2.1.3",
|
"ms": "2.1.3",
|
||||||
"mongoose": "7.2.2",
|
"mongoose": "7.1.1",
|
||||||
"systeminformation": "5.17.16",
|
"systeminformation": "5.17.12",
|
||||||
"@octokit/rest": "19.0.11",
|
"@octokit/rest": "19.0.8",
|
||||||
"@octokit/auth-token": "3.0.3",
|
"@octokit/auth-token": "3.0.3",
|
||||||
"typescript": "5.1.3",
|
"typescript": "5.0.4",
|
||||||
"xml-js": "1.6.11"
|
"xml-js": "1.6.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ms": "0.7.31",
|
"@types/ms": "0.7.31",
|
||||||
"@types/node": "20.2.5"
|
"@types/node": "20.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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(this.client.logTime(), `${userid} extended to level ${newData.level}`);
|
console.log(`${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});
|
||||||
|
Loading…
Reference in New Issue
Block a user