NewShopEmbed() public static method

public static NewShopEmbed ( List waifus, string prefix, ulong guildId, ShopType type = ShopType.Waifu ) : EmbedBuilder
waifus List
prefix string
guildId ulong
type ShopType
return EmbedBuilder
Beispiel #1
0
        public async Task ModShop([Remainder] string str = "")
        {
            WaifuShop shop = await WaifuUtil.GetShop(Context.Guild.Id, ShopType.Mod);

            int              count  = Constants.shoplimitedamount + Constants.shopt1amount + Constants.shopt2amount + Constants.shopt3amount;
            string           prefix = Program.GetPrefix(Context);
            List <ShopWaifu> waifus = new List <ShopWaifu>();

            if (shop != null)
            {
                waifus = shop.ShopWaifus;
            }

            waifus = waifus.OrderBy(x => x.Waifu.Tier).ThenBy(x => x.Waifu.Source).ThenBy(x => x.Waifu.Name).ToList();

            if (waifus.Count <= count)
            {
                var eb = WaifuUtil.NewShopEmbed(waifus, prefix, Context.Guild.Id, ShopType.Mod);
                await Context.Channel.SendMessageAsync("", false, eb.Build());

                return;
            }

            await PagedReplyAsync(WaifuUtil.PaginatedShopMessage(waifus, count, prefix, Context.Guild.Id, ShopType.Mod));
        }
Beispiel #2
0
        public async Task GachaShop([Remainder] string str = "")
        {
            WaifuShop shop = await WaifuUtil.GetShop(Context.Guild.Id, ShopType.Gacha);

            string prefix = Program.GetPrefix(Context);
            var    waifus = shop.ShopWaifus.OrderByDescending(x => x.Limited).ThenBy(x => x.Waifu.Tier).ThenBy(x => x.Waifu.Source).ToList();

            var eb = WaifuUtil.NewShopEmbed(waifus, prefix, Context.Guild.Id, ShopType.Gacha);
            await Context.Channel.SendMessageAsync("", false, eb.Build());
        }