mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 08:41:39 +01:00
fight greedy chatters spamming !getloot
This commit is contained in:
12
src/user.ts
12
src/user.ts
@@ -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`);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user