Esempio n. 1
0
        public async Task Periods()
        {
            Period[] periods = await BotUtils.GetPeriodsFromDb();

            StringBuilder description_builder = new StringBuilder();

            EmbedBuilder embed = new EmbedBuilder();

            embed.WithTitle(string.Format("📅 All periods ({0})", periods.Count()));
            embed.WithDescription(description_builder.ToString());

            foreach (Period period in periods)
            {
                embed.AddField(period.GetName(),
                               string.Format("{0}—{1} ({2}, {3})",
                                             period.GetStartTimestampString(),
                                             period.GetEndTimestampString(),
                                             period.GetHowLongString(),
                                             period.GetHowLongAgoString()
                                             ));
            }



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