From 724abc89b991c07842bdcbc905fe232df0165496 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 3 May 2021 20:45:33 +0300 Subject: [PATCH] Tweak counter reset logic (v2) --- .../src/plugins/Counters/commands/ResetAllCounterValuesCmd.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Counters/commands/ResetAllCounterValuesCmd.ts b/backend/src/plugins/Counters/commands/ResetAllCounterValuesCmd.ts index c6f518b2..1868ef37 100644 --- a/backend/src/plugins/Counters/commands/ResetAllCounterValuesCmd.ts +++ b/backend/src/plugins/Counters/commands/ResetAllCounterValuesCmd.ts @@ -50,8 +50,10 @@ export const ResetAllCounterValuesCmd = guildCommand()({ const lock = await pluginData.locks.acquire(counterIdLock(counterId)); await resetAllCounterValues(pluginData, args.counterName); - lock.unlock(); + lock.interrupt(); sendSuccessMessage(pluginData, message.channel, `All counter values for **${counterName}** have been reset`); + + pluginData.getKnubInstance().reloadGuild(pluginData.guild.id); }, });