fixes
parent
4f1a9b01d9
commit
a67cc4d595
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable no-await-in-loop */
|
||||
import { Client } from '..';
|
||||
|
||||
export default async function existingLimitsSetup(client: Client): Promise<number> {
|
||||
|
@ -10,15 +11,15 @@ export default async function existingLimitsSetup(client: Client): Promise<numbe
|
|||
|
||||
for (const account of accounts) {
|
||||
if (account.tier === 1) {
|
||||
account.updateOne({ $set: { ramLimitNotification: tier1.resourceLimits.ram - 20 } });
|
||||
await client.db.Account.updateOne({ userID: account.userID }, { $set: { ramLimitNotification: tier1.resourceLimits.ram - 20 } });
|
||||
numOfAccountsUpdated += 1;
|
||||
}
|
||||
if (account.tier === 2) {
|
||||
account.updateOne({ $set: { ramLimitNotification: tier2.resourceLimits.ram - 20 } });
|
||||
await client.db.Account.updateOne({ userID: account.userID }, { $set: { ramLimitNotification: tier2.resourceLimits.ram - 20 } });
|
||||
numOfAccountsUpdated += 1;
|
||||
}
|
||||
if (account.tier === 3) {
|
||||
account.updateOne({ $set: { ramLimitNotification: tier3.resourceLimits.ram - 20 } });
|
||||
await client.db.Account.updateOne({ userID: account.userID }, { $set: { ramLimitNotification: tier3.resourceLimits.ram - 20 } });
|
||||
numOfAccountsUpdated += 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue