diff --git a/modules/ContentStore/Handler/Store.cs b/modules/ContentStore/Handler/Store.cs index 0d84bb2..49fc85a 100644 --- a/modules/ContentStore/Handler/Store.cs +++ b/modules/ContentStore/Handler/Store.cs @@ -41,7 +41,8 @@ public class Store : BotEventHandler var counter = 0; var list = new List(); - foreach (var item in _provider.GetServices()) + foreach (var item in _provider.GetServices() + .OrderByDescending(s => s.StoreItem.Order)) { var btn = item.StoreItem.ToButton(From.Id); if ((counter & 1) == 0) // 0 - even, 1 - odd diff --git a/modules/ContentStore/Model/StoreItem.cs b/modules/ContentStore/Model/StoreItem.cs index 604d1af..268a5fe 100644 --- a/modules/ContentStore/Model/StoreItem.cs +++ b/modules/ContentStore/Model/StoreItem.cs @@ -7,12 +7,14 @@ public class StoreItem public string Id; public readonly string Name; public readonly double Price; + public readonly int Order; - public StoreItem(string id, string name, double price) + public StoreItem(string id, string name, double price, int order = 0) { Id = id; Name = name; Price = price; + Order = order; } public InlineKeyboardButton ToButton(long userId) diff --git a/modules/ContentStore/Service/AnimBoobsService.cs b/modules/ContentStore/Service/AnimBoobsService.cs index 7fab5bc..ff300b9 100644 --- a/modules/ContentStore/Service/AnimBoobsService.cs +++ b/modules/ContentStore/Service/AnimBoobsService.cs @@ -6,7 +6,7 @@ namespace West.TelegramBot.ContentStore.Service; public class AnimBoobsService : IRandomMediaService { private readonly HttpClient _httpClient; - public StoreItem StoreItem { get; } = new("boobs", "Сиськи движущиеся", 120); + public StoreItem StoreItem { get; } = new("anim_boobs", "Сиськи движущиеся", 120, 40); public AnimBoobsService() { diff --git a/modules/ContentStore/Service/CatApiService.cs b/modules/ContentStore/Service/CatApiService.cs index 88fa8b7..b9757cd 100644 --- a/modules/ContentStore/Service/CatApiService.cs +++ b/modules/ContentStore/Service/CatApiService.cs @@ -4,6 +4,6 @@ namespace West.TelegramBot.ContentStore.Service; public class CatApiService : AnimalAsAService { - public override StoreItem StoreItem { get; } = new("cat", "Котэ", 40); + public override StoreItem StoreItem { get; } = new("cat", "Котэ", 40, 10); public CatApiService() : base(new Uri("https://api.thecatapi.com/v1/")) {} } \ No newline at end of file diff --git a/modules/ContentStore/Service/DogApiService.cs b/modules/ContentStore/Service/DogApiService.cs index cf1ab1e..43bc3e7 100644 --- a/modules/ContentStore/Service/DogApiService.cs +++ b/modules/ContentStore/Service/DogApiService.cs @@ -4,6 +4,6 @@ namespace West.TelegramBot.ContentStore.Service; public class DogApiService : AnimalAsAService { - public override StoreItem StoreItem { get; } = new("dog", "Пёсель", 40); + public override StoreItem StoreItem { get; } = new("dog", "Пёсель", 40, 20); public DogApiService() : base(new Uri("https://api.thedogapi.com/v1/")) {} } \ No newline at end of file diff --git a/modules/ContentStore/Service/OBoobsService.cs b/modules/ContentStore/Service/OBoobsService.cs index 2566f97..f13cf62 100644 --- a/modules/ContentStore/Service/OBoobsService.cs +++ b/modules/ContentStore/Service/OBoobsService.cs @@ -6,7 +6,7 @@ namespace West.TelegramBot.ContentStore.Service; public class OBoobsService : IRandomMediaService { private readonly HttpClient _httpClient; - public StoreItem StoreItem { get; } = new("boobs", "Сиськи", 60); + public StoreItem StoreItem { get; } = new("boobs", "Сиськи", 60, 30); public OBoobsService() {