mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Compare commits
2 Commits
1d248554d1
...
8ca48051f5
Author | SHA1 | Date | |
---|---|---|---|
|
8ca48051f5 | ||
|
ae53d11947 |
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.1.1",
|
"mongoose": "7.2.2",
|
||||||
"systeminformation": "5.17.12",
|
"systeminformation": "5.17.16",
|
||||||
"@octokit/rest": "19.0.8",
|
"@octokit/rest": "19.0.11",
|
||||||
"@octokit/auth-token": "3.0.3",
|
"@octokit/auth-token": "3.0.3",
|
||||||
"typescript": "5.0.4",
|
"typescript": "5.1.3",
|
||||||
"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.0"
|
"@types/node": "20.2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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});
|
||||||
|
Loading…
Reference in New Issue
Block a user