Ejemplo n.º 1
0
        static void client_AddedToClusterInvite(object sender, Framework.SDK.AddedToClusterInviteQQEventArgs e)
        {
            if (e.ClusterMember.QQ == client.User.QQ)//邀请机器人
            {
                Console.WriteLine("机器人被{0}邀请加入{1}", e.ClusterMemberAdmin, e.Cluster);
                if (DateTime.Now.Minute % 2 == 0)
                {
                    client.AgreeAddedToClusterInvite(e.Cluster.ExternalId, false, "测试");
                }
                else
                {
                    client.AgreeAddedToClusterInvite(e.Cluster.ExternalId);
                }
            }
            else
            {
                Console.WriteLine("{2}被{0}邀请加入{1}", e.ClusterMemberAdmin, e.Cluster, e.ClusterMember);

                if (DateTime.Now.Minute % 2 == 0)
                {
                    client.AgreeJoinCluster(e.Cluster.ExternalId, e.ClusterMember.QQ, false, "测试");
                }
                else
                {
                    client.AgreeJoinCluster(e.Cluster.ExternalId, e.ClusterMember.QQ);
                }
            }
        }