예제 #1
0
        public bool Parse(Message msg, string[] args)
        {
            try
            {
                if (args[0] == "set")
                {
                    switch (args[1])
                    {
                        case "anspoint":
                            int num;
                            bool isNum = Int32.TryParse(args[2], out num);
                            if (isNum)
                            {
                                USettings.answerpoint = num;
                                Mamichan.SendMessage("Set Answer point to " + USettings.answerpoint);
                            }
                            break;
                        default:
                            break;
                    }
                }
            }
            catch (Exception e)
            {
                
            }

            return true;
        }
예제 #2
0
 public virtual bool Parse(Message Msg)
 {
     List<string> args = new List<string>();
     args.AddRange(Msg.Msg.Split(' '));
     string cmd = args.First().Substring(1);
     SubCommand sc = GetSubCommand(cmd);
     if(sc != null)
     {
         if(!Msg.UserRole.HasFlag(sc.AccessLevel))
         {
             return false;
         }
         args.RemoveAt(0);
         return sc.Parse(Msg, args.ToArray());
     }
     return false;
 }
예제 #3
0
 public override bool Parse(Message msg)
 {
     switch(msg.Msg)
     {
         case "เกมอะไรครับ":
             Mamichan.SendMessage("ให้ทาย");
             break;
         case "ให้ทาย":
             Mamichan.SendMessage("ยอมแล้วเฉลยที");
             break;
         case "สวัสดีครับ":
             Mamichan.SendMessage("สวัสดีครับ");
             break;
         case "สวัสดีค่ะ":
             Mamichan.SendMessage("สวัสดีค่ะ");
             break;
         case "ใคร":
             Mamichan.SendMessage("แน่นอนว่าไม่ใช่มามิบอท");
             break;
         case "ปลาอะไรใช้แล้ว":
             Mamichan.SendMessage("KappaPride");
             break;
         case "ขอ ip หน่อยครับ":
             Mamichan.SendMessage("อ่านคำอธิบายกลุ่มด้วยครับ");
             break;
         case "ใครเป็นเกย์":
             Mamichan.SendMessage("ต๊วงเกย์");
             break;
         case "?":
             Mamichan.SendMessage("?");
             break;
         default:
             break;
     }
     return true;
 }
예제 #4
0
 public bool Parse(Message msg, string[] args)
 {
     Mamichan.SendMessage("MamiBot พร้อมทำงานค่ะ!");
     return true;
 }
예제 #5
0
 public bool Parse(Message msg, string[] args)
 {
     Mamichan.SendMessage(msg.disname + ": " + "http://on.fb.me/1HfQE5f");
     return true;
 }
예제 #6
0
 public bool Parse(Message msg, string[] args)
 {
     Mamichan.SendMessage("Overlay cmd");
     return true;
 }
예제 #7
0
 public bool Parse(Message msg, string[] args)
 {
     Mamichan.SendMessage("Mylive Bot Chat Server Disconnected, Please Refresh Yout page.");
     return true;
 }