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); }
public static EmbedBuilder ListAllEmbed(List <ImageCount> images, string prefix = "!", IUser author = null) { var eb = new EmbedBuilderPrepared(author); eb.WithDescription($"<:Awooo:582888496793124866> `{prefix}pat` - use reaction images!\n" + $"<:NadeYay:564880253382819860> `{prefix}album pat` - link to an imgur album with all the images!\n" + $"<:KannaHype:571690048001671238> `{prefix}i 20` - use a specific reaction image by id!"); if (images.Any(x => x.Count >= 20)) { string list = ""; foreach (var x in images.Where(x => x.Count >= 20)) { list += "`" + x.ToString() + "` "; } eb.AddField("20+ images", list); } if (images.Any(x => x.Count >= 10 && x.Count < 20)) { string list = ""; foreach (var x in images.Where(x => x.Count >= 10 && x.Count < 20)) { list += "`" + x.ToString() + "` "; } eb.AddField("10+ images", list); } if (images.Any(x => x.Count >= 5 && x.Count < 10)) { string list = ""; foreach (var x in images.Where(x => x.Count >= 5 && x.Count < 10)) { list += "`" + x.ToString() + "` "; } eb.AddField("5+ images", list); } if (images.Any(x => x.Count > 0 && x.Count < 5)) { string list = ""; foreach (var x in images.Where(x => x.Count >= 1 && x.Count < 5)) { list += "`" + x.ToString() + "` "; } eb.AddField("<5 images", list); } return(eb); }
public static EmbedBuilder ListMarriageEmbed(List <Marriage> marriages, IUser author) { var eb = new EmbedBuilderPrepared(author); string list = ""; int i = 1; foreach (var x in marriages) { list += $"`#{i++}` {BasicUtil.IdToMention(GetWifeId(x, author.Id))}\n"; } eb.AddField("User List <:MiaHug:536580304018735135>", list); return(eb); }
public async Task ListDisabledCommands([Remainder] string name = "") { string modules = "-"; string commands = "-"; if (DisabledCommandHandler.DisabledCommands.TryGetValue(Context.Guild.Id, out var set) && set.Any()) { commands = string.Join(" | ", set); } if (DisabledCommandHandler.DisabledModules.TryGetValue(Context.Guild.Id, out set) && set.Any()) { modules = string.Join(" | ", set); } var eb = new EmbedBuilderPrepared(Context.User); eb.AddField("Disabled Modules", modules); eb.AddField("Disabled Commands", commands); if (DisabledCommandHandler.DisabledImages.Contains(Context.Guild.Id)) { eb.AddField("Reaction Images", "All Disabled"); } await ReplyAsync(embed : eb.Build()); }
public async Task Status() { var shards = Context.Client.Shards; var eb = new EmbedBuilderPrepared(); int homeShard = -1; if (Context.Guild != null) { homeShard = (int)(Context.Guild.Id << 22) % Context.Client.Shards.Count; } foreach (var shard in shards) { eb.AddField($"Shard {shard.ShardId}{(shard.ShardId == homeShard ? " - your shard" : "")}", $"State: {shard.ConnectionState}\n" + $"Latency: {shard.Latency}\n", true); } await Context.Channel.SendMessageAsync(embed : eb.Build()); }
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); }
public static EmbedBuilder BoxStatsEmbed(IUser author = null) { var eb = new EmbedBuilderPrepared(author); string str = ""; foreach (var item in LootboxStats.Lootboxes) { var box = item.Value; str += $"**Waifu Chance**:\n"; foreach (var w in box.WaifuChance) { str += $" T{w.Key} - *{w.Value}%*\n"; } str += $"**Toastie Chance**:\n"; str += $" Chance: *{box.ToastieChance}%*\n"; str += $" Amount: *{box.ToastiesFrom} - {box.ToastiesTo}*\n"; eb.AddField($"{box.Emote} {box.Name}", str, true); str = ""; } return(eb); }