bug fix to db call
This commit is contained in:
parent
19df36319f
commit
4e93e35325
@ -330,7 +330,7 @@ class ModerationManager {
|
||||
|
||||
for(const infraction of infractions) {
|
||||
const expiration = infraction.timestamp + infraction.duration*1000;
|
||||
if(expiration-currentDate < 0) {
|
||||
if(expiration-currentDate <= 0) {
|
||||
await resolve(infraction);
|
||||
continue;
|
||||
}
|
||||
@ -350,7 +350,7 @@ class ModerationManager {
|
||||
|
||||
async _removeExpiration(expiration) {
|
||||
this.client.logger.debug(`Expired infraction ${expiration.infraction.type} for user ${expiration.infraction.target}.`);
|
||||
await this.client.storageManager.infractions.updateOne(
|
||||
await this.client.storageManager.mongodb.infractions.updateOne(
|
||||
{ id: expiration.infraction.id },
|
||||
{ callbacked: true }
|
||||
).catch((e) => {}); //eslint-disable-line no-empty, no-unused-vars, no-empty-function
|
||||
|
Loading…
Reference in New Issue
Block a user