public static EmbedBuilder PlaylistListEmbed(List <Playlist> playlists, IUser author = null, bool select = false) { var eb = new EmbedBuilderLava(author); if (playlists.Count < 1) { eb.WithDescription("*~ No Playlists Found ~*"); return(eb); } string list = ""; int i = 0; int p = 1; foreach (var playlist in playlists) { if (list.Length + playlist.Name.Length > 1000) { eb.AddField($"Playlists#{p++}", list); list = ""; } list += $"`#{++i}` {playlist.Name} - {playlist.UserId.IdToMention()}\n"; } eb.AddField($"Playlists#{p++}", list); if (select) { eb.WithDescription("Enter the number of the playlist you wish to select"); eb.WithFooter("Times out in 23 seconds"); } return(eb); }
// EMBEDS public static EmbedBuilder TrackSelectEmbed(List <LavaTrack> tracks, IUser author = null) { var eb = new EmbedBuilderLava(author); string str = ""; int i = 0; foreach (var track in tracks) { i++; str += $"`#{i}` {track.Title.ShortenString(60, 55)}\n"; } eb.AddField($"Search Results :musical_note:", str); eb.WithDescription("Enter the number of the song you wish to select __"); eb.WithFooter("Times out in 23 seconds"); return(eb); }