using Telegram.Bot.Types; namespace Kruzya.TelegramBot.Core.Option; public class OptionKey : IOptionKey { public long ChatId { get; } public long? UserId { get; } = null; public string Identifier { get; } public OptionKey(Chat chat, User user, string identifier) : this(chat.Id, user.Id, identifier) {} public OptionKey(Chat chat, string identifier) : this(chat.Id, null, identifier) {} public OptionKey(long chat, string identifier) : this(chat, null, identifier) {} public OptionKey(long chat, long? user, string identifier) { ChatId = chat; UserId = user; Identifier = identifier; } }