Example #1
0
        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);
        }
Example #2
0
        // 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);
        }
Example #3
0
        public static EmbedBuilder TrackListEmbed(IEnumerable <LavaTrack> tracks, IUser author = null, bool loop = false)
        {
            var eb = new EmbedBuilderLava(author);

            int i = 0;

            if (loop)
            {
                eb.WithTitle("Looping Playlist - :repeat:");
            }
            //string str = loop ? ":repeat: - **Looping Playlist**\n" : "";
            string str = "";

            foreach (var track in tracks)
            {
                i++;
                str += $"`#{i}` [{track.Title.ShortenString(70, 65)}]({track.Url})\n";
            }

            eb.WithAuthor($"Song Queue", author?.GetAvatarUrl(), LinkHelper.GetRedirectUrl(LinkHelper.Patreon, "Patreon", "cmd-embed-queue"));
            eb.WithDescription(str);
            return(eb);
        }