mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Initial KV API concept
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user