3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-16 22:21:51 +00:00

automod: fix cooldowns applying across rules

This commit is contained in:
Dragory 2021-04-02 17:59:41 +03:00
parent 9ac4e15573
commit 4f66f004d5
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

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)) {