Exemple #1
0
        public async Task Credits()
        {
            var embB = new EmbedBuilder()
                       .WithTitle("Credits")
                       .WithColor(Color.Blue)
                       .WithUrl("https://www.github.com/repos/petrspelos/Community-Discord-BOT/")
                       .WithFooter(Global.GetRandomDidYouKnow())
                       // Someone needs to pimp this message... it is lame
                       .WithDescription("Peter is the one who created me... fleshed me out and taught me how to speak.\n" +
                                        "Everything was organized... my life was good :smiley:\n" +
                                        "And then he let those people lose on me... :scream:\n");


            var contributions = await GitHub.Contributions("petrspelos", "Community-Discord-BOT");

            // Sort contributions by commits
            contributions = contributions.OrderByDescending(contribution => contribution.total).ToList();
            // Creating the embeds with all the contributers and their stats
            embB = contributions.Aggregate(embB, (emb, cont) =>
            {
                // Accumulate all the weeks stats to the total stat
                var stats = cont.weeks.Aggregate(
                    Tuple.Create(0, 0),
                    (acc, week) => Tuple.Create(acc.Item1 + week.a, acc.Item2 + week.d)
                    );
                return(emb.AddField(GitHub.ContributionStat(cont, stats)));
            });

            await ReplyAsync("", false, embB.Build());
        }
Exemple #2
0
        public async Task Credits()
        {
            var embB = new EmbedBuilder()
                       .WithAuthor("Bugger - licencja BEERWARE")
                       .WithTitle("Twórcy:")
                       .WithDescription("Hejjj, miło, że tu zajrzałeś. :blush:\n" +
                                        "Tworzył mnie przez dziesięć dni (i dziesięć nocy) względnie 3-osobowy zespół w składzie:\n" +
                                        "***__~~Ejmi~~__*** - najlepszej żeńskiej programistki w naszym zespole, _(a przynajmniej robi to lepeij niż gotuje xdd)_\n" +
                                        "***__~~ZottelvonUrvieh~~__*** - _(on też nie wie jak to przeczytać, spk)_\nmenadżer projektu, kierownik artystyczny , mistrz teorii, psycholog, pediatra dziecięcy i jeśli trzeba ginekolog po ojcu " +
                                        "1 słowem bez niego nie _(nie)_ byłoby nic. :heart:\n" +
                                        "***__~~DODEK~~__*** - też cośtam klikał. A tak to sumie to tak jak poprzednik, tylko, że on umie programować XD. Dobrze zastępuje komputer we nasze wspólne chłodne noce przed Visual Studio :joy::sweat_smile::cry::sob:\n" +
                                        "Dodatkowe źródła: Autor publicznego \"Community-Discord-BOT\" (na którego strukturach się uczyliśmy i wzorowaliśmy) i tutoriala do implementacji języka C# dla discorda - Petrspelos\n" +
                                        "Po dokończeniu tego projektu, który mamy zamiar aktywnie wspierać jeszcze koło miesiąc planujemy coś coś... a z resztą zobaczycie!!!\nLove & Care,  **ADz Tim**")
                       .WithFooter("Więcej info? Też chcesz bota? A może chcesz nas wspomóc? (xD) Pisz tu: [email protected]!")
                       .WithColor(0, 255, 0);

            var contributions = await GitHub.Contributions("Dodek69", "Bugger");

            // Sort contributions by commits
            contributions = contributions.OrderByDescending(contribution => contribution.total).ToList();
            // Creating the embeds with all the contributers and their stats
            embB = contributions.Aggregate(embB, (emb, cont) =>
            {
                // Accumulate all the weeks stats to the total stat
                var stats = cont.weeks.Aggregate(
                    Tuple.Create(0, 0),
                    (acc, week) => Tuple.Create(acc.Item1 + week.a, acc.Item2 + week.d)
                    );
                return(emb.AddField(GitHub.ContributionStat(cont, stats)));
            });

            await ReplyAsync("", false, embB.Build());
        }