Ejemplo n.º 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);
                        Memory.AddMemoryItem(msg, user, Utils.GetUserName(context));
                        return(new BotMessage {
                            Text = "I'll Shall Not Forget!"
                        });
                    }
                }
            }
            return(new BotMessage {
                Text = ""
            });
            //return new BotMessage { Text = string.Format("Hello {0}, I do not recognize your command", user) };
        }