fight greedy chatters spamming !getloot

This commit is contained in:
2025-09-10 00:27:58 +02:00
parent f243677c5c
commit 354ad8211b
3 changed files with 30 additions and 1 deletions

View File

@@ -108,4 +108,16 @@ export default class User {
public async clearVulnerable(): Promise<void> {
await redis.del(`user:${this.id}:vulnerable`);
};
public async setGreed(): Promise<void> {
await redis.set(`user:${this.id}:greedy`, '1');
};
public async clearGreed(): Promise<void> {
await redis.del(`user:${this.id}:greedy`);
};
public async greedy(): Promise<boolean> {
return await redis.exists(`user:${this.id}:greedy`);
};
};