예제 #1
0
        public async Task GetDay(CommandContext ctx, string day = "сегодня")
        {
            string message = string.Empty;

            var dayOfWeak = DayOfTheWeak.GetDayOfTheWeak(day);

            if (dayOfWeak == null)
            {
                message = "Не найденно";
            }
            else
            {
                message = dayOfWeak.Item1;
            }

            await ctx.Channel.SendMessageAsync(message).ConfigureAwait(false);
        }
예제 #2
0
        public async Task GetTimetableDay(CommandContext ctx,
                                          [Description("День: \"Вчера\" \"Сегодня\" \"Завтра\"")] string day = "сегодня",
                                          [Description("Группа")] string groupName = "бст1902")
        {
            var dayOfWeak = DayOfTheWeak.GetDayOfTheWeak(day);

            if (dayOfWeak == null)
            {
                return;
            }

            if (dayOfWeak.Item1.ToLower().Equals("выходной"))
            {
                await ctx.Channel.SendMessageAsync(dayOfWeak.Item1).ConfigureAwait(false);

                return;
            }

            foreach (var message in Timetable.GetMessageTimetable(groupName, dayOfWeak))
            {
                await ctx.Channel.SendMessageAsync(message).ConfigureAwait(false);
            }
        }