From 84e2ba44c5decc2e384f1dbaf941ac92cb327fce Mon Sep 17 00:00:00 2001 From: Andriy <30056636+West14@users.noreply.github.com> Date: Wed, 18 Jan 2023 16:03:41 +0200 Subject: [PATCH] [entertainment] enable accidentally disabled cooldown check --- modules/Entertainment/Handler/Guess.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/Entertainment/Handler/Guess.cs b/modules/Entertainment/Handler/Guess.cs index 0ecd558..63e265f 100644 --- a/modules/Entertainment/Handler/Guess.cs +++ b/modules/Entertainment/Handler/Guess.cs @@ -35,11 +35,11 @@ public class Guess : CommonHandler { var cooldownOption = await _db.UserValues.FindOrCreateOption(Chat.Id, From.Id, "guessCooldown"); var cooldown = cooldownOption.GetValue(); - // if (cooldown > DateTime.Now) - // { - // await Reply($"Следующее использование через {cooldown - DateTime.Now:hh\\:mm\\:ss}."); - // return; - // } + if (cooldown > DateTime.Now) + { + await Reply($"Следующее использование через {cooldown - DateTime.Now:hh\\:mm\\:ss}."); + return; + } var guessDict = _guessCache.GetOr(Chat.Id, new ConcurrentDictionary());