Esempio n. 1
0
        public async Task GetTodaysHolidays()
        {
            var now      = DateTime.Now;
            var holidays = await _holidayService.GetHolidaysByDate(now, "US");

            if (holidays.Length > 0)
            {
                var embed = new EmbedBuilder()
                            .WithTitle("Today's Holidays");

                foreach (var holiday in holidays)
                {
                    embed.AddField(holiday.Name, holiday.Type);
                }

                await ReplyAsync(embed : embed.Build());
            }
            else
            {
                await ReplyAsync("There are no US holidays today.");
            }
        }