mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[store] Basic content store implementation.
- Bump Telegram Bot Framework to 0.6.9-gf1e77653ff
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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}"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user