From a9c89cd6163e08005e6f7896d2000612a345c174 Mon Sep 17 00:00:00 2001 From: qwerinope Date: Fri, 25 Jul 2025 00:29:47 +0100 Subject: [PATCH] make itemlock work the same as other statuses --- src/user.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/user.ts b/src/user.ts index 82a2e24..0be2647 100644 --- a/src/user.ts +++ b/src/user.ts @@ -88,8 +88,7 @@ export default class User { }; public async itemLock(): Promise { - const lock = await redis.get(`user:${this.id}:itemlock`); - return lock === '1'; + return await redis.exists(`user:${this.id}:itemlock`); }; public async setLock(): Promise { @@ -97,7 +96,7 @@ export default class User { }; public async clearLock(): Promise { - await redis.set(`user:${this.id}:itemlock`, '0'); + await redis.del(`user:${this.id}:itemlock`); }; public async setVulnerable(): Promise {