mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
e815deba58
- Bump Telegram Bot Framework to 0.6.9-gf1e77653ff
25 lines
540 B
C#
25 lines
540 B
C#
using Telegram.Bot.Types.ReplyMarkups;
|
|
|
|
namespace West.TelegramBot.ContentStore.Model;
|
|
|
|
class StoreItem
|
|
{
|
|
public string Id;
|
|
public readonly string Name;
|
|
public readonly double Price;
|
|
|
|
public StoreItem(string id, string name, double price)
|
|
{
|
|
Id = id;
|
|
Name = name;
|
|
Price = price;
|
|
}
|
|
|
|
public InlineKeyboardButton ToButton(long userId)
|
|
{
|
|
return new InlineKeyboardButton($"{Name} ({Price})")
|
|
{
|
|
CallbackData = $"store|{userId}|purchase|{Id}"
|
|
};
|
|
}
|
|
} |