mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
27 lines
666 B
C#
27 lines
666 B
C#
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;
|
|
}
|
|
}
|