mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[quote] Crappy chat quote implementation.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace West.TelegramBot.ChatQuotes.Model;
|
||||
|
||||
public class User : Telegram.Bot.Types.User
|
||||
{
|
||||
[JsonProperty]
|
||||
public string Name => LastName != null ? $"{FirstName} {LastName}" : FirstName;
|
||||
|
||||
public static User FromTgUser(Telegram.Bot.Types.User user)
|
||||
{
|
||||
return new User
|
||||
{
|
||||
Id = user.Id,
|
||||
FirstName = user.FirstName,
|
||||
LastName = user.LastName,
|
||||
Username = user.Username,
|
||||
LanguageCode = user.LanguageCode,
|
||||
IsBot = user.IsBot
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user