Ejemplo n.º 1
0
        public static EmbedBuilder BoxListEmbed(List <LootBox> boxes, IUser author)
        {
            var eb = new EmbedBuilderPrepared(author);

            string gstr = "";
            string lstr = "";

            for (int i = 0; i < boxes.Count; i++)
            {
                var    box   = LootboxStats.Lootboxes[boxes[i].Type];
                string field = $"`#{i+1}` {box.Emote} {box.Name} - **x{boxes[i].Amount}**\n";

                if (boxes[i].GuildId == 0)
                {
                    gstr += field;
                }
                else
                {
                    lstr += field;
                }
            }

            if (gstr != "")
            {
                eb.AddField("Global", gstr);
            }
            if (lstr != "")
            {
                eb.AddField("Local", lstr);
            }

            eb.WithFooter("Try the `lootboxstats` command");
            return(eb);
        }
Ejemplo n.º 2
0
        public static EmbedBuilder BoxShopEmbed(IUser author)
        {
            var eb = new EmbedBuilderPrepared(author);

            string str   = "";
            int    count = 0;

            foreach (var item in LootboxStats.Lootboxes)
            {
                var box = item.Value;
                if (box.Price >= 0)
                {
                    string emote = box.Emote == null ? "" : box.Emote == "" ? "" : box.Emote + " ";
                    str += $"{++count}. {emote}{box.Name} - **{box.Price}** {RandomEmote()}\n";
                }
            }

            eb.WithFooter("Try the `lootboxstats` command");
            eb.WithAuthor("Lootbox Shop", author.GetAvatarUrl(), LinkHelper.GetRedirectUrl(LinkHelper.Patreon, "Patreon", "cmd-embed-lootbox"));
            eb.AddField("Lootboxes", str);
            eb.WithDescription("`!bl` to buy a lootbox!");
            return(eb);
        }