Пример #1
0
        private static string GetLessonReply(LessonReply lessonReply)
        {
            if (lessonReply == null)
            {
                return(null);
            }
            var reply = $"{lessonReply.LessonInfo.Item1} через {lessonReply.LessonInfo.Item2} минут";
            var text  = new MessageResponse(ResponseType.NextLesson).response;

            return(text + reply);
        }
Пример #2
0
        public void SendMessage(BotUser user, Application.Reply reply)
        {
            var currentCommand = DefineCommand(user);
            var message        = reply switch
            {
                ScheduleReply s => GetReply(s),
                LessonReply l => GetLessonReply(l),
                LinksReply s => GetLinksReply(s),
                _ => null,
            };

            if (message != null)
            {
                vkMessageSender.SendNotification(user, message, currentCommand.GetKeyboard());
            }
        }