Files
telegram-bot/Core/Options/IOption.cs
T

20 lines
505 B
C#
Raw Normal View History

2023-07-21 17:14:11 +03:00
using System.Collections.Generic;
2023-07-20 20:24:16 +03:00
using System.Threading.Tasks;
namespace Kruzya.TelegramBot.Core.Options;
2023-07-21 17:14:11 +03:00
public interface IOption
2023-07-20 20:24:16 +03:00
{
2023-07-21 17:14:11 +03:00
public string OptionId { get; }
public string OptionName { get; }
public OptionType OptionType { get; }
public List<SelectChoice> ChoiceList { get; }
}
public interface IOption<TValue> : IOption
{
public TValue DefaultValue { get; }
2023-07-20 20:24:16 +03:00
public Task<TValue> GetValueAsync(long chatId);
public Task SetValueAsync(long chatId, TValue value);
}