mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-18 23:01:38 +01:00
explosive timeouts can no longer stack
This commit is contained in:
@@ -37,6 +37,7 @@ export const timeout = async (user: User, reason: string, duration?: number): Pr
|
||||
return { status: false, reason: 'unknown' };
|
||||
};
|
||||
|
||||
await user.clearVulnerable();
|
||||
await redis.set(`user:${user.id}:timeout`, '1');
|
||||
if (duration) await redis.expire(`user:${user.id}:timeout`, duration);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user