3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 08:45:03 +00:00

automod: fix cooldowns applying across rules

This commit is contained in:
Dragory 2021-04-02 17:59:41 +03:00
parent 76e727a43e
commit 6273b5f534

View file

@ -8,7 +8,7 @@ export function checkAndUpdateCooldown(
rule: TRule, rule: TRule,
context: AutomodContext, context: AutomodContext,
) { ) {
const cooldownKey = context.user?.id; const cooldownKey = `${rule.name}-${context.user?.id}`;
if (cooldownKey) { if (cooldownKey) {
if (pluginData.state.cooldownManager.isOnCooldown(cooldownKey)) { if (pluginData.state.cooldownManager.isOnCooldown(cooldownKey)) {