Пример #1
0
        public BotMessage GetResponse(ResponseContext context)
        {
            LoadCommands();
            var msg  = Utils.StringBuilder(context.Message.Text);
            var user = context.Message.User.FormattedUserID;

            if (context.Message.MentionsBot)
            {
                foreach (string command in commands)
                {
                    if (context.Message.Text.ToLower().Contains(command))
                    {
                        Console.WriteLine(context.Message.User.ID);
                        Reminder.AddReminderItem(msg, user, DateTime.Now.AddMinutes(2), Utils.GetUserName(context));
                        return(new BotMessage {
                            Text = "I'll remind you"
                        });
                    }
                }
            }
            return(new BotMessage {
                Text = ""
            });
        }