mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[reputation] Add debug logs.
This commit is contained in:
@@ -100,6 +100,7 @@ namespace West.TelegramBot.ChatManagement.Handler
|
||||
}
|
||||
|
||||
var diff = Math.Round(senderRepCount == 0 ? 1 : Math.Sqrt(senderRepCount), 2);
|
||||
_logger.LogDebug("Calculated diff: {Diff}", diff);
|
||||
|
||||
string action;
|
||||
if (RepUpChars.Contains(text))
|
||||
@@ -113,8 +114,10 @@ namespace West.TelegramBot.ChatManagement.Handler
|
||||
action = "уменьшил";
|
||||
}
|
||||
|
||||
_logger.LogDebug("Saving receiver rep with value: {Value}", receiverRepCount);
|
||||
receiverRepOption.SetValue(receiverRepCount);
|
||||
Db.Update(receiverRepOption);
|
||||
_logger.LogDebug("Updated value: {Value}", receiverRepOption.GetValue<double>());
|
||||
|
||||
await Reply($"{From.ToHtml()}<code>({await GetUserReputation(From)}) " +
|
||||
$"{action} репутацию </code>{receiver.ToHtml()}<code>({Math.Round(receiverRepCount, 2)})</code>");
|
||||
|
||||
Reference in New Issue
Block a user