diff --git a/Core/Extensions/UserExtension.cs b/Core/Extensions/UserExtension.cs index 800a1f9..6940c3d 100644 --- a/Core/Extensions/UserExtension.cs +++ b/Core/Extensions/UserExtension.cs @@ -20,5 +20,12 @@ namespace Kruzya.TelegramBot.Core.Extensions } return text.Append("").ToString(); } + + public static string ToLog(this User user) + { + var name = $"{user.FirstName} {user.LastName}".Trim(); + + return $"{name} (ID: {user.Id}, Username: {user.Username ?? "N/A"})"; + } } } \ No newline at end of file