Beispiel #1
0
 /// <summary>置群添加请求。</summary>
 /// <param name="react">请求反馈标识。</param>
 /// <param name="requestType">请求类型。</param>
 /// <param name="reactType">反馈类型。</param>
 /// <param name="reason">加群原因。</param>
 public static void SetGroupAddRequest(string react, CQRequestType requestType, CQReactType reactType, string reason = "")
 {
     nLogger.Info(string.Format("[↑][请群] {0} {1} {2} {3}", react, requestType, reactType, reason));
     CQUDPProxy.GetInstance().SendMessage(
         string.Format("GroupAddRequest {0} {1} {2} {3}",
                       Convert.ToBase64String(Encoding.Default.GetBytes(react)),
                       (int)requestType,
                       (int)reactType,
                       Convert.ToBase64String(Encoding.Default.GetBytes(reason))));
 }
Beispiel #2
0
Datei: CQ.cs Projekt: zzzzzga/CQP
        /// <summary>
        /// 置群添加请求。
        /// </summary>
        /// <param name="react">请求反馈标识。</param>
        /// <param name="requestType">请求类型。</param>
        /// <param name="reactType">反馈类型。</param>
        /// <param name="reason">加群原因。</param>
        public static void SetGroupAddRequest(string react, CQRequestType requestType, CQReactType reactType, string reason = "")
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][请群] {0} {1} {2}", react, requestType, reactType));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupAddRequest|{0}|{1}|{2}|{3}", react, (int)requestType, (int)reactType, reason.Replace("|", "$内容分割$"));
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupAddRequestV2(CQAPI.GetAuthCode(), react, (int)requestType, (int)reactType, reason);
            }
        }
Beispiel #3
0
Datei: CQ.cs Projekt: zzzzzga/CQP
 public static void 置群添加请求(string react, CQRequestType requestType, CQReactType reactType, string reason = "")
 {
     SetGroupAddRequest(react, requestType, reactType, reason);
 }