diff --git a/modules/Entertainment/Handler/Guess.cs b/modules/Entertainment/Handler/Guess.cs index b7be23f..0ecd558 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()); @@ -114,7 +114,6 @@ public class Guess : CommonHandler } await Bot.AnswerCallbackQueryAsync(CallbackQuery.Id); - await Bot.DeleteMessageAsync(Chat, (int) messageId); guessDict.TryRemove((int) messageId, out _); _guessCache.SetValue(Chat.Id, guessDict, -1); @@ -133,7 +132,7 @@ public class Guess : CommonHandler message = $"{fromUser.ToHtml()} не угадал!"; } - await Bot.SendTextMessageAsync(Chat, message + postFix, parseMode: ParseMode.Html); + await Bot.EditMessageTextAsync(Chat, (int) messageId, message + postFix, parseMode: ParseMode.Html); var cooldownOption = await _db.UserValues.FindOrCreateOption(Chat.Id, From.Id, "guessCooldown"); cooldownOption.SetValue(nextUse);