public async Task Stats() { var messengerUsername = Message.From.Username; var chatId = Chat.Id.ToString(); var chatStats = await _gameLogicService.GetChatStats(messengerUsername, chatId); var msg = "Stats\n"; foreach (var user in chatStats.UsersStats) { int percent = 0; if (user.TotalAnswersCount != 0) { percent = user.CorrectAnswersCount * 100 / user.TotalAnswersCount; } msg += $"\n@{user.MessengerUsername}" + $"\n correct answers: {user.CorrectAnswersCount}" + $"\n try to answer: {user.TotalAnswersCount}" + $"\n percentage: {percent}%;"; } await SendTextMessageAsync(msg); }