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; }
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; }
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; }
public bool Parse(Message msg, string[] args) { Mamichan.SendMessage("MamiBot พร้อมทำงานค่ะ!"); return true; }
public bool Parse(Message msg, string[] args) { Mamichan.SendMessage(msg.disname + ": " + "http://on.fb.me/1HfQE5f"); return true; }
public bool Parse(Message msg, string[] args) { Mamichan.SendMessage("Overlay cmd"); return true; }
public bool Parse(Message msg, string[] args) { Mamichan.SendMessage("Mylive Bot Chat Server Disconnected, Please Refresh Yout page."); return true; }