public static int IR_Event( string receiverQq, int eventType, int eventAdditionType, string fromNum, string eventOperator, string triggee, string message, string messageNum, string messageID, string rawMessage, string json, string pText) { // TODO pText 需要确定如何处理 PluginInstanceManager.GetInstance().HandleMahuaOutput(new Event { ReceiverQq = receiverQq, EventAdditionType = eventAdditionType, EventOperator = eventOperator, EventType = eventType, FromNum = fromNum, Message = message, RawMessage = rawMessage, Triggee = triggee, MessageId = messageID, MessageNum = messageNum, Json = json, }); // TODO 对于特定的请求,需要处理返回值。例如入群邀请。 return(0); }
public static string IR_Create() { PluginInstanceManager.GetInstance().HandleMahuaOutput(new Create()); return ($"插件名称{{{AgentInfo.Instance.Id}}}\n插件版本{{{AgentInfo.Instance.Version}}}\n插件作者{{{AgentInfo.Instance.Author}}}\n插件说明{{{AgentInfo.Instance.Description}}}\n" + "插件skey{8956RTEWDFG3216598WERDF3}\n插件sdk{S3}"); }
public static int IR_Event( string receiverQq, int eventType, int eventAdditionType, string fromNum, string eventOperator, string triggee, string message, string messageNum, string messageID, string rawMessage, string json, string pText) { var endCommandResult = PluginInstanceManager.GetInstance() .SendCommand <EventFunCommand, EventFunCommandResult>(new EventFunCommand { ReceiverQq = receiverQq, EventAdditionType = eventAdditionType, EventOperator = eventOperator, EventType = eventType, FromNum = fromNum, Message = message, RawMessage = rawMessage, Triggee = triggee, MessageId = System.Convert.ToInt64(messageID), MessageNum = System.Convert.ToInt64(messageNum), }); return(endCommandResult.Result); }
public static string IR_Create() { var getInfoCommandResult = PluginInstanceManager.GetInstance() .SendCommand <IrCreateCommand, IrCreateCommandResult>(new IrCreateCommand()); return(getInfoCommandResult.Info); }
public static int IR_DestroyPlugin() { var endCommandResult = PluginInstanceManager.GetInstance() .SendCommand <IrDestroyPluginCommand, IrDestroyPluginCommandResult>(new IrDestroyPluginCommand()); return(endCommandResult.Result); }
public static int IR_Message(string RobotQQ, int MsgType, string Msg, string Cookies, string SessionKey, string ClientKey) { PluginInstanceManager.GetInstance().HandleMahuaOutput(new Message { RobotQQ = RobotQQ, MsgType = MsgType, Msg = Msg, Cookies = Cookies, SessionKey = SessionKey, ClientKey = ClientKey }); return(1); }
public static int IR_DestroyPlugin() { PluginInstanceManager.GetInstance().HandleMahuaOutput(new DestroyPlugin()); // TODO 对于特定的请求,需要处理返回值。 return(0); }
public static void IR_SetUp() { PluginInstanceManager.GetInstance().SendCommand(new ConfigurationManagerCommand()); }