From ad13577541b9dfe0fba281a48dc3abf3697dde02 Mon Sep 17 00:00:00 2001 From: West14 <30056636+West14@users.noreply.github.com> Date: Fri, 7 Jan 2022 15:46:04 +0200 Subject: [PATCH] Change superuser command log category. Fix cooldowns command. --- modules/ChatManagement/Handler/Reputation.cs | 2 +- modules/Entertainment/Handler/Common.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ChatManagement/Handler/Reputation.cs b/modules/ChatManagement/Handler/Reputation.cs index a419a04..dc8b34c 100644 --- a/modules/ChatManagement/Handler/Reputation.cs +++ b/modules/ChatManagement/Handler/Reputation.cs @@ -113,7 +113,7 @@ namespace West.TelegramBot.ChatManagement.Handler { if (!_userService.IsUserSuper(From)) { - _logger.LogDebug("{User} attempted to call /setrep in {Chat}", From, Chat.Title); + _logger.LogInformation("{User} attempted to call /setrep in {Chat}", From, Chat.Title); return; } diff --git a/modules/Entertainment/Handler/Common.cs b/modules/Entertainment/Handler/Common.cs index ffdb496..843221a 100644 --- a/modules/Entertainment/Handler/Common.cs +++ b/modules/Entertainment/Handler/Common.cs @@ -33,7 +33,7 @@ namespace West.Entertainment.Handler { if (!_userService.IsUserSuper(From)) { - _logger.LogDebug("{User} attempted to call /cooldowns in \"{Chat}\"", From, Chat.Title); + _logger.LogInformation("{User} attempted to call /cooldowns in \"{Chat}\"", From, Chat.Title); return; } @@ -50,7 +50,7 @@ namespace West.Entertainment.Handler } msg.Text($"{cd}: ") - .Code((val - DateTime.Now).Duration().ToString()) + .Code(DateTime.Now > val ? "Ready" : (val - DateTime.Now).ToString()) .Br(); }