Esempio n. 1
0
        public static string ToStringCustom(this EmbedBuilder eb)
        {
            var fieldsStringList = new List <string>();

            foreach (var field in eb.Fields)
            {
                fieldsStringList.Add(ExtensionsEmbedFieldBuilder.ToString(field));
            }

            return($"{eb.Title}, {eb.Description}, {eb.Color}, {eb.Author}, {string.Join(", ", fieldsStringList)}, {eb.Url}");
        }
Esempio n. 2
0
        public static EmbedBuilder GenerateBuilderReadRegister(List <string> users, Color colorTopTen)
        {
            string playersString = string.Join("\n    ", users);
            var    fields        = new List <EmbedFieldBuilder>
            {
                ExtensionsEmbedFieldBuilder.Create("Liste des joueurs :", string.IsNullOrEmpty(playersString) ? "No Players" : playersString),
            };

            EmbedBuilder builder = InitBuilder(fields, colorTopTen);

            return(builder);
        }
Esempio n. 3
0
        public static EmbedBuilder GenerateBuilderForNumberDisplay(Modeles.TopTenGame topTen, string theme)
        {
            string numbers = TopTenService.GenerateNumbers(topTen.Users);

            var fields = new List <EmbedFieldBuilder>
            {
                ExtensionsEmbedFieldBuilder.Create("Le thème est le suivant :", theme),
                ExtensionsEmbedFieldBuilder.Create("Le Cap'TEN est :", topTen.Capten),
                ExtensionsEmbedFieldBuilder.Create("Tirage des numéros :", string.IsNullOrEmpty(numbers) ? "No players" : numbers),
            };

            return(InitBuilder(fields, topTen.ColorTopTen));
        }