mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 09:01:38 +01:00
make itemlock work the same as other statuses
This commit is contained in:
@@ -88,8 +88,7 @@ export default class User {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public async itemLock(): Promise<boolean> {
|
public async itemLock(): Promise<boolean> {
|
||||||
const lock = await redis.get(`user:${this.id}:itemlock`);
|
return await redis.exists(`user:${this.id}:itemlock`);
|
||||||
return lock === '1';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public async setLock(): Promise<void> {
|
public async setLock(): Promise<void> {
|
||||||
@@ -97,7 +96,7 @@ export default class User {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public async clearLock(): Promise<void> {
|
public async clearLock(): Promise<void> {
|
||||||
await redis.set(`user:${this.id}:itemlock`, '0');
|
await redis.del(`user:${this.id}:itemlock`);
|
||||||
};
|
};
|
||||||
|
|
||||||
public async setVulnerable(): Promise<void> {
|
public async setVulnerable(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user