示例#1
0
 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);
 }
示例#2
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}");
 }
示例#3
0
        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);
        }
示例#4
0
        public static string IR_Create()
        {
            var getInfoCommandResult = PluginInstanceManager.GetInstance()
                                       .SendCommand <IrCreateCommand, IrCreateCommandResult>(new IrCreateCommand());

            return(getInfoCommandResult.Info);
        }
示例#5
0
        public static int IR_DestroyPlugin()
        {
            var endCommandResult = PluginInstanceManager.GetInstance()
                                   .SendCommand <IrDestroyPluginCommand, IrDestroyPluginCommandResult>(new IrDestroyPluginCommand());

            return(endCommandResult.Result);
        }
示例#6
0
 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);
 }
示例#7
0
 public static int IR_DestroyPlugin()
 {
     PluginInstanceManager.GetInstance().HandleMahuaOutput(new DestroyPlugin());
     // TODO 对于特定的请求,需要处理返回值。
     return(0);
 }
示例#8
0
 public static void IR_SetUp()
 {
     PluginInstanceManager.GetInstance().SendCommand(new ConfigurationManagerCommand());
 }