Files

27 lines
666 B
C#
Raw Permalink Normal View History

2023-01-05 08:01:18 +03:00
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;
}
}