美文网首页
QQ事件类型

QQ事件类型

作者: 玄鸡快跑 | 来源:发表于2016-08-24 10:20 被阅读0次

事件类型

/// <summary>
/// qq事件类型
/// </summary>
public enum QQEventType
{
    /// <summary>
    /// 默认值,事件判断出错, 出现这个时, 忽略就可
    /// </summary>
    [Description("默认值")]
    NOTHING,

    #region 聊天消息
    /// <summary>
    /// 好友消息
    /// </summary>
    [Description("好友消息")]
    MSG_FRIEND,

    /// <summary>
    /// 陌生人消息
    /// </summary>
    [Description("陌生人消息")]
    MSG_STRANGER,

    /// <summary>
    /// 来自群或者讨论组的临时会话消息
    /// </summary>
    [Description("来自群或者讨论组的临时会话消息")]
    MSG_TEMP_SESSION,

    /// <summary>
    /// 来自群的消息
    /// </summary>
    [Description("来自群的消息")]
    MSG_CLUSTER,

    /// <summary>
    /// 来自临时群的消息 
    /// 讨论组消息
    /// </summary>
    [Description("来自临时群的消息")]
    MSG_TEMP_CLUSTER,
    #endregion

    #region 系统通知事件

    /// <summary>
    /// 账号已经离线
    /// 网络等问题而产生的离线
    /// </summary>
    [Description("SYS_OFFLINE  账号已经离线事件")]
    SYS_OFFLINE,

    /// <summary>
    /// 别处登录而被强迫离线了
    /// </summary>
    [Description("SYS_CROWDED_OFFLINE  别处登录而被强迫离线了")]
    SYS_CROWDED_OFFLINE,

    /// <summary>
    /// 执行登录操作后返回时触发这个事件,需要注意的是,不代表此时的机器人的状态是已经登录的了
    /// </summary>
    [Description("SYS_AFTERLOGIN  执行登录操作后返回时触发这个事件")]
    SYS_AFTERLOGIN,

    /// <summary>
    /// 某人请求加我为好友
    /// </summary>
    [Description("SYS_SOMEONE_REQUEST_ADD_ME  某人请求加我为好友")]
    SYS_SOMEONE_REQUEST_ADD_ME,

    /// <summary>
    /// 我发出邀请后,对方同意加我为好友
    /// </summary>
    [Description("SYS_SOMEONE_AGREED_ADDED_ME  对方同意加我为好友")]
    SYS_SOMEONE_AGREED_ADDED_ME,

    /// <summary>
    /// 我发出邀请后,对方拒绝加我为好友
    /// </summary>
    [Description("SYS_SOMEONE_REJECT_ADDED_ME  对方拒绝加我为好友")]
    SYS_SOMEONE_REJECT_ADDED_ME,

    /// <summary>
    /// 有人请求加入我管理的群
    /// </summary>
    [Description("SYS_REQUEST_JOIN_CLUSTER  有人请求加入我管理的群")]
    SYS_REQUEST_JOIN_CLUSTER,

    /// <summary>
    /// 其他成员邀请他人入群, 收到这个事件时,那个人已经同意加入群, 但还没有被管理员同意加入
    /// </summary>
    [Description("SYS_JOIN_CLUSTER_BY_OTHER_MEM  其他成员邀请他人入群")]
    SYS_JOIN_CLUSTER_BY_OTHER_MEM,

    /// <summary>
    /// 其他管理员邀请他人入群, 收到这个事件时,这个人已经入群了
    /// </summary>
    [Description("SYS_JOIN_CLUSTER_BY_OTHER_ADMIN  其他管理员邀请他人入群")]
    SYS_JOIN_CLUSTER_BY_OTHER_ADMIN,

    /// <summary>
    /// 其他成员邀请某人加入某群时,其他管理员同意让其加入
    /// 收到这条消息时,此人已经入群了
    /// </summary>
    [Description("SYS_AGREED_JOIN_CLUSTER_BY_OTHER_ADMIN  其他成员邀请某人加入某群时,其他管理员同意让其加入")]
    SYS_AGREED_JOIN_CLUSTER_BY_OTHER_ADMIN,

    /// <summary>
    /// 其他好友邀请我加入某群
    /// subcmd 260
    /// </summary>
    [Description("SYS_SOMEONE_INVITE_ME_JOIN_CLUSTER  其他好友邀请我加入某群")]
    SYS_SOMEONE_INVITE_ME_JOIN_CLUSTER,

    /// <summary>
    /// 通知我被加入到一个群,这个群先前已经建立,我是后来被加的
    /// 收到这个事件的时候,我已经是某个群的成员了
    /// </summary>
    [Description("SYS_ADDED_ME_TO_CLUSTER  通知我被加入到一个群")]
    SYS_ADDED_ME_TO_CLUSTER,

    /// <summary>
    /// 我发出邀请后,对方同意加入群
    /// </summary>
    [Description("SYS_SOMEONE_AGREED_JOIN_CLUSTER  我发出邀请后,对方同意加入群")]
    SYS_SOMEONE_AGREED_JOIN_CLUSTER,

    /// <summary>
    /// 我发出邀请后,对方拒绝加入群
    /// </summary>
    [Description("SYS_SOMEONE_REJECT_JOIN_CLUSTER  我发出邀请后,对方拒绝加入群")]
    SYS_SOMEONE_REJECT_JOIN_CLUSTER,

    /// <summary>
    /// 我被管理员移除出某个群
    /// </summary>
    [Description("SYS_DELETED_ME_FROM_CLUSTER  我被管理员移除出某个群")]
    SYS_DELETED_ME_FROM_CLUSTER,

    /// <summary>
    /// 某人被管理踢了
    /// subcmd 3
    /// </summary>
    [Description("SYS_MEM_DELETED_BY_ADMIN  某人被管理踢了")]
    SYS_MEM_DELETED_BY_ADMIN,

    /// <summary>
    /// 成员退群
    /// </summary>
    [Description("SYS_MEM_QUIT_CLUSTER  成员退群")]
    SYS_MEM_QUIT_CLUSTER,


    /// <summary>
    /// 某群被解散了
    /// subcmd 1
    /// </summary>
    [Description("SYS_DISSOLVE_CLUSTER  某群被解散了")]
    SYS_DISSOLVE_CLUSTER,

    /// <summary>
    /// 某成员成为管理员
    /// subcmd 1
    /// </summary>
    [Description("SYS_SOMEONE_BE_ADMIN  某成员成为管理员")]
    SYS_SOMEONE_BE_ADMIN,

    /// <summary>
    /// 我成为管理员
    /// subcmd 1
    /// </summary>
    [Description("SYS_I_BE_ADMIN  我成为管理员")]
    SYS_I_BE_ADMIN,

    /// <summary>
    /// 某管理员被撤销
    /// subcmd 0
    /// </summary>
    [Description("SYS_ADMIN_BE_MEM  某管理员被撤销")]
    SYS_ADMIN_BE_MEM,

    /// <summary>
    /// 我的管理员资格被撤销
    /// subcmd 0
    /// </summary>
    [Description("SYS_ADMIN_BE_MEM_ME  我的管理员资格被撤销")]
    SYS_ADMIN_BE_MEM_ME,

    /// <summary>
    /// 某成员被禁言
    /// </summary>
    [Description("SYS_SOMEONE_BANNED  某成员被禁言")]
    SYS_SOMEONE_BANNED,

    /// <summary>
    /// 某成员被解禁
    /// 超时自动解禁时不支持
    /// </summary>
    [Description("SYS_SOMEONE_DISBANNED  某成员被解禁")]
    SYS_SOMEONE_DISBANNED,

    /// <summary>
    /// 群全体禁言
    /// </summary>
    [Description("SYS_CLUSTER_BANNED  群全体禁言")]
    SYS_CLUSTER_BANNED,

    /// <summary>
    /// 群解禁
    /// 超时自动解禁时不支持
    /// </summary>
    [Description("SYS_CLUSTER_DISBANNED  群解禁")]
    SYS_CLUSTER_DISBANNED
    #endregion
}

事件类

基类

/// <summary>
/// qq事件基类
/// </summary>
public class QQEvent
{
    /// <summary>
    /// qq事件基类
    /// </summary>
    /// <param name="uin">机器人qq</param>
    public QQEvent(uint uin)
    {
        Uin = uin;
        Type = QQEventType.NOTHING;
    }
    /// <summary>
    /// 机器人qq
    /// </summary>
    public uint Uin
    {
        get;
        private set;
    }

    /// <summary>
    /// 事件类型
    /// </summary>
    public QQEventType Type
    {
        get;
        internal set;
    }
}

消息类

#region 聊天消息
/// <summary>
/// 好友消息事件类
/// </summary>
public class FriendMsgEvent: QQEvent
{
    /// <summary>
    /// 好友消息
    /// </summary>
    /// <param name="uin"> 机器人qq号 </param>
    /// <param name="friendUin"> 好友列表 </param>
    /// <param name="msg"> 消息 </param>
    public FriendMsgEvent(uint uin, uint friendUin, string msg) : base(uin)
    {
        FriendUin = friendUin;
        Msg = msg;
        Type = QQEventType.MSG_FRIEND;
    }

    /// <summary>
    /// 好友qq号
    /// </summary>
    public uint FriendUin
    {
        get;
        internal set;
    }
    /// <summary>
    /// 消息
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}

/// <summary>
/// 陌生人消息事件
/// </summary>
public class StrangerMsgEvent: QQEvent
{
    /// <summary>
    /// 陌生人事件
    /// </summary>
    /// <param name="uin"> 机器人qq </param>
    /// <param name="strangerUin"> 陌生人qq </param>
    /// <param name="msg"> 消息 </param>
    public StrangerMsgEvent(uint uin, uint strangerUin, string msg) : base(uin)
    {
        StrangerUin = strangerUin;
        Msg = msg;
        Type = QQEventType.MSG_STRANGER;
    }

    /// <summary>
    /// 陌生人qq
    /// </summary>
    public uint StrangerUin
    {
        get;
        internal set;
    }

    /// <summary>
    /// 消息
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}

/// <summary>
/// 临时群消息事件
/// </summary>
public class TempSessionMsgEvent: QQEvent
{
    /// <summary>
    /// 临时消息
    /// </summary>
    /// <param name="uin"> 机器人qq </param>
    /// <param name="code"> 临时群号 </param>
    /// <param name="senderUin"> 发送者qq </param>
    /// <param name="msg"> 消息 </param>
    public TempSessionMsgEvent(uint uin, uint code, uint senderUin, string msg): base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        Msg = msg;
        Type = QQEventType.MSG_TEMP_SESSION;
    }

    /// <summary>
    /// 临时群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }

    /// <summary>
    /// 发送者qq
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }

    /// <summary>
    /// 消息
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}

/// <summary>
/// 群消息事件
/// </summary>
public class ClusterMsgEvent : QQEvent
{
    /// <summary>
    /// 群消息事件
    /// </summary>
    /// <param name="uin"> 机器人qq </param>
    /// <param name="code"> 群号 </param>
    /// <param name="senderUin"> 发送者qq </param>
    /// <param name="msg"> 消息 </param>
    /// <param name="images"> 照片列表 </param>
    /// <param name="senderId"> 发送者id,利用id跟images去请求qq服务器获取图片列表 </param>
    public ClusterMsgEvent(uint uin, uint code, uint senderUin, string msg, Object images, uint senderId)
        :base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        Msg = msg;
        Images = images;
        SenderId = senderId;
        Type = QQEventType.MSG_CLUSTER;
    }

    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }

    /// <summary>
    /// 发送者qq
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
    /// <summary>
    /// 消息
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
    /// <summary>
    /// 图片列表
    /// </summary>
    public Object Images
    {
        get;
        internal set;
    }
    /// <summary>
    /// 发送者id
    /// </summary>
    public uint SenderId
    {
        get;
        internal set;
    }
}

/// <summary>
/// 讨论组消息事件
/// </summary>
public class DiscussMsgEvent : QQEvent
{
    /// <summary>
    /// 讨论组消息事件
    /// </summary>
    /// <param name="uin">机器人qq</param>
    /// <param name="discussId"> 讨论组id </param>
    /// <param name="senderUin"> 发送者qq </param>
    /// <param name="msg"> 消息 </param>
    public DiscussMsgEvent(uint uin, uint discussId, uint senderUin, string msg) : base(uin)
    {
        DiscussId = discussId;
        SenderUin = senderUin;
        Msg = msg;
        Type = QQEventType.MSG_TEMP_CLUSTER;
    }

    /// <summary>
    /// 讨论组id
    /// </summary>
    public uint DiscussId
    {
        get;
        internal set;
    }

    /// <summary>
    /// 发送者qq
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }

    /// <summary>
    /// 消息
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}
#endregion

系统通知消息

#region 系统消息

/// <summary>
/// 机器人下线事件
/// </summary>
public class OffLineEvent: QQEvent
{
    /// <summary>
    /// 机器人下线事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="time">下线时间</param>
    public OffLineEvent(uint uin, DateTime time): base(uin)
    {
        Time = time;
        Type = QQEventType.SYS_OFFLINE;    
    }

    /// <summary>
    /// 下线事件
    /// </summary>
    public DateTime Time
    {
        get;
        internal set;
    }
}

/// <summary>
/// 机器人进行登录后返回的事件
/// 不代表qq已经是在线状态
/// </summary>
public class AfterLoginEvent: QQEvent
{
    /// <summary>
    /// 机器人进行登录后返回的事件
    /// 不代表qq已经是在线状态
    /// </summary>
    /// <param name="uin"> 登录的机器人 </param>
    /// <param name="status"> qq的状态 </param>
    public AfterLoginEvent(uint uin, RobotLoginStatus status): base(uin)
    {
        Status = status;
        Type = QQEventType.SYS_AFTERLOGIN;
    }

    /// <summary>
    /// 状态
    /// </summary>
    public RobotLoginStatus Status
    {
        get;
        internal set;
    }
}

/// <summary>
/// 机器人被挤下线事件
/// </summary>
public class CrowedOffLineEvent: QQEvent
{
    /// <summary>
    /// 机器人被挤下线事件
    /// </summary>
    /// <param name="uin">机器人qq</param>
    public CrowedOffLineEvent(uint uin): base(uin)
    {
        Type = QQEventType.SYS_CROWDED_OFFLINE;
    }
}

/// <summary>
/// 某人请求加我为好友事件
/// </summary>
public class RequestMakeFriendEvent: QQEvent
{
    /// <summary>
    /// 某人请求加我为好友事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="senderUin">请求者</param>
    /// <param name="msg">留言</param>
    public RequestMakeFriendEvent(uint uin, uint senderUin, string msg): base(uin)
    {
        SenderUin = senderUin;
        Msg = msg;
        Type = QQEventType.SYS_SOMEONE_REQUEST_ADD_ME;
    }

    /// <summary>
    /// 请求者
    /// </summary>
    public uint SenderUin
    {
        internal set;
        get;
    }
    /// <summary>
    /// 留言
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}

/// <summary>
/// 我发出邀请后,对方同意了加我为好友的事件
/// </summary>
public class AgreedMakeFriendEvent: QQEvent
{
    /// <summary>
    /// 我发出邀请后,对方同意了加我为好友的事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="senderUin">同意者</param>
    public AgreedMakeFriendEvent(uint uin, uint senderUin): base(uin)
    {
        SenderUin = senderUin;
        Type = QQEventType.SYS_SOMEONE_AGREED_ADDED_ME;
    }

    /// <summary>
    /// 同意者
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 我发出邀请后,对方拒绝了加我为好友事件
/// </summary>
public class RejectMakeFriendEvent: QQEvent
{
    /// <summary>
    /// 我发出邀请后,对方拒绝了加我为好友事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="senderUin">拒绝者</param>
    /// <param name="msg">消息留言</param>
    public RejectMakeFriendEvent(uint uin, uint senderUin, string msg): base(uin)
    {
        SenderUin = senderUin;
        Msg = msg;
        Type = QQEventType.SYS_SOMEONE_REJECT_ADDED_ME;
    }

    /// <summary>
    /// 拒绝者
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }

    /// <summary>
    /// 消息留言
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}

/// <summary>
/// 有人请求加入我管理的群的事件
/// </summary>
public class RequestJoinClusterEvent: QQEvent
{
    /// <summary>
    /// 有人请求加入我管理的群的事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">请求者</param>
    /// <param name="token"> 验证 </param>
    /// <param name="msg">留言</param>
    public RequestJoinClusterEvent(uint uin, uint code, uint senderUin, byte[] token, string msg)
        :base(uin)
    {
        Code = code;
        Requester = senderUin;
        Token = token;
        Msg = msg;
        Type = QQEventType.SYS_REQUEST_JOIN_CLUSTER;
    }

    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 请求者
    /// </summary>
    public uint Requester
    {
        get;
        internal set;
    }
    /// <summary>
    /// 验证
    /// </summary>
    public byte[] Token
    {
        get;
        internal set;
    }

    /// <summary>
    /// 留言
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}

/// <summary>
/// 其他成员邀请他人入群事件, 收到这个事件时,那个人已经同意加入群, 但还没有被管理员同意加入
/// </summary>
public class JoinClusterByOtherMemEvent: QQEvent
{
    /// <summary>
    /// 其他成员邀请他人入群事件, 收到这个事件时,那个人已经同意加入群, 但还没有被管理员同意加入
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="inviter">邀请者</param>
    /// <param name="invitee">受邀请的人</param>
    /// <param name="token">验证</param>
    public JoinClusterByOtherMemEvent(uint uin, uint code, uint inviter, uint invitee, byte[] token)
        :base(uin)
    {
        Code = code;
        Inviter = inviter;
        Invitee = invitee;
        Token = token;
        Type = QQEventType.SYS_JOIN_CLUSTER_BY_OTHER_MEM;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 邀请者
    /// </summary>
    public uint Inviter
    {
        get;
        internal set;
    }
    /// <summary>
    /// 被邀请者
    /// </summary>
    public uint Invitee
    {
        get;
        internal set;
    }
    /// <summary>
    /// 验证
    /// </summary>
    public byte[] Token
    {
        get;
        internal set;
    }
}

/// <summary>
/// 其他管理员邀请他人入群事件, 收到这个事件时,这个人已经入群了
/// </summary>
public class JoinClusterByAdminEvent: QQEvent
{
    /// <summary>
    /// 其他管理员邀请他人入群事件, 收到这个事件时,这个人已经入群了
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="inviter">邀请他人的人</param>
    /// <param name="invitee">受邀请的人</param>
    public JoinClusterByAdminEvent(uint uin, uint code, uint inviter, uint invitee)
        :base(uin)
    {
        Code = code;
        Inviter = inviter;
        Invitee = invitee;
        Type = QQEventType.SYS_JOIN_CLUSTER_BY_OTHER_ADMIN;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 邀请他人的人
    /// </summary>
    public uint Inviter
    {
        get;
        internal set;
    }
    /// <summary>
    /// 受邀请的人
    /// </summary>
    public uint Invitee
    {
        get;
        internal set;
    }
}

/// <summary>
/// 其他成员邀请某人加入某群时,其他管理员同意让其加入群事件
/// 收到这条消息时,此人已经入群了
/// </summary>
public class AgreedJoinClusterByAdminEvent : QQEvent
{
    /// <summary>
    /// 其他成员邀请某人加入某群时,其他管理员同意让其加入群事件
    /// 收到这条消息时,此人已经入群了
    /// </summary>
    /// <param name="uin"> 机器人qq </param>
    /// <param name="code"> 群号 </param>
    /// <param name="senderUin"> 同意的管理员 </param>
    /// <param name="operateUin"> 请求者 </param>
    public AgreedJoinClusterByAdminEvent(uint uin, uint code, uint senderUin, uint operateUin)
        :base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        OperateUin = operateUin;
        Type = QQEventType.SYS_AGREED_JOIN_CLUSTER_BY_OTHER_ADMIN;
    }

    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 同意的管理员
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
    /// <summary>
    /// 请求者
    /// </summary>
    public uint OperateUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 其他好友邀请机器人(我)加入某群事件
/// </summary>
public class InviteMeJoinClusterEvent: QQEvent
{
    /// <summary>
    /// 其他好友邀请机器人(我)加入某群事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">邀请我的人</param>
    public InviteMeJoinClusterEvent(uint uin, uint code, uint senderUin): base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        Type = QQEventType.SYS_SOMEONE_INVITE_ME_JOIN_CLUSTER;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 邀请我的人
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 通知我(机器人)被加入到一个群的事件, 此时我已经是群的成员了
/// </summary>
public class AddedClusterEvent: QQEvent
{
    /// <summary>
    /// 通知我(机器人)被加入到一个群的事件, 此时我已经是群的成员了
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    public AddedClusterEvent(uint uin, uint code): base(uin)
    {
        Code = code;
        Type = QQEventType.SYS_ADDED_ME_TO_CLUSTER;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
}

/// <summary>
/// 我发出邀请后,对方同意加入群的事件
/// </summary>
public class AgreedJoinCluster: QQEvent
{
    /// <summary>
    /// 我发出邀请后,对方同意加入群时调用
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">同意加入群的人</param>
    public AgreedJoinCluster(uint uin, uint code, uint senderUin): base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        Type = QQEventType.SYS_SOMEONE_AGREED_JOIN_CLUSTER;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 同意加入群的人
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 我发出邀请后,对方拒绝加入群
/// </summary>
public class RejectJoinCluster: QQEvent
{
    /// <summary>
    /// 我发出邀请后,对方拒绝加入群
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">拒绝加入群的人</param>
    /// /// <param name="msg">留言</param>
    public RejectJoinCluster(uint uin, uint code, uint senderUin, string msg): base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        Msg = msg;
        Type = QQEventType.SYS_SOMEONE_REJECT_JOIN_CLUSTER;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 拒绝加入群的人
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
    /// <summary>
    /// 留言
    /// </summary>
    public string Msg
    {
        get;
        internal set;
    }
}

/// <summary>
/// 我被管理员移除出某个群事件
/// </summary>
public class DeletedFromClusterEvent : QQEvent
{
    /// <summary>
    /// 我被管理员移除出某个群事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">删我的管理员</param>
    public DeletedFromClusterEvent(uint uin, uint code, uint senderUin) : base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        Type = QQEventType.SYS_DELETED_ME_FROM_CLUSTER;
    }

    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }

    /// <summary>
    /// 删我的管理员
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 某人被管理踢了事件
/// </summary>
public class MemberDeletedByAdminEvent : QQEvent
{
    /// <summary>
    /// 某人被管理踢了的事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">删人的管理员</param>
    /// <param name="operateUin">被删的人</param>
    public MemberDeletedByAdminEvent(uint uin, uint code, uint senderUin, uint operateUin) :base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        OperateUin = operateUin;
        Type = QQEventType.SYS_MEM_DELETED_BY_ADMIN;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 删人的管理员
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
    /// <summary>
    /// 被删的人
    /// </summary>
    public uint OperateUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 成员退群事件
/// </summary>
public class MemberQuitClusterEvent: QQEvent
{
    /// <summary>
    /// 成员退群事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="quittter">退群的人</param>
    public MemberQuitClusterEvent(uint uin, uint code, uint quittter) : base(uin)
    {
        Code = code;
        Quittter = quittter;
        Type = QQEventType.SYS_MEM_QUIT_CLUSTER;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 退群的人
    /// </summary>
    public uint Quittter
    {
        get;
        internal set;
    }
}

/// <summary>
/// 某群被解散事件
/// </summary>
public class DissolveClusterEvent: QQEvent
{
    /// <summary>
    /// 某群被解散事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    public DissolveClusterEvent(uint uin, uint code): base(uin)
    {
        Code = code;
        Type = QQEventType.SYS_DISSOLVE_CLUSTER;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
}

/// <summary>
/// 某成员成为管理员事件
/// </summary>
public class MemberBeAdminEvent: QQEvent
{
    /// <summary>
    /// 某成员成为管理员事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="memberUin">成为管理员的成员</param>
    public MemberBeAdminEvent(uint uin, uint code, uint memberUin): base(uin)
    {
        Code = code;
        MemberUin = memberUin;
        Type = QQEventType.SYS_SOMEONE_BE_ADMIN;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 成为管理员的成员
    /// </summary>
    public uint MemberUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 我成为管理员事件
/// </summary>
public class RobotBeAdminEvent: QQEvent
{
    /// <summary>
    /// 我成为管理员事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    public RobotBeAdminEvent(uint uin, uint code): base(uin)
    {
        Code = code;
        Type = QQEventType.SYS_I_BE_ADMIN;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
}

/// <summary>
/// 某人被撤销管理员资格事件
/// </summary>
public class MemberRevokedAdminEvent: QQEvent
{
    /// <summary>
    /// 某人被撤销管理员资格事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="operateUin">被撤销管理员资格的人</param>
    public MemberRevokedAdminEvent(uint uin, uint code, uint operateUin): base(uin)
    {
        Code = code;
        OperateUin = operateUin;
        Type = QQEventType.SYS_ADMIN_BE_MEM;
    }

    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 被撤销管理员资格的人
    /// </summary>
    public uint OperateUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 我的管理员资格被撤销事件
/// </summary>
public class RobotRevokedAdminEvent: QQEvent
{
    /// <summary>
    /// 我的管理员资格被撤销事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    public RobotRevokedAdminEvent(uint uin, uint code) : base(uin)
    {
        Code = code;
        Type = QQEventType.SYS_ADMIN_BE_MEM_ME;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
}

/// <summary>
/// 某成员被禁言事件
/// </summary>
public class MemberBannedEvent : QQEvent
{
    /// <summary>
    /// 某成员被禁言事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">进行设置操作的管理员</param>
    /// <param name="operateUin">被禁言的人</param>
    public MemberBannedEvent(uint uin, uint code, uint senderUin, uint operateUin) : base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        OperateUin = operateUin;
        Type = QQEventType.SYS_SOMEONE_BANNED;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 进行设置操作的管理员
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
    /// <summary>
    /// 被禁言的人
    /// </summary>
    public uint OperateUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 某成员被解禁事件
/// 超时自动解禁时不支持
/// </summary>
public class MemberDisBannedEvent : QQEvent
{
    /// <summary>
    /// 某成员被解禁时调用
    /// 超时自动解禁时不支持
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">管理员</param>
    /// <param name="operateUin">被禁言的人</param>
    public MemberDisBannedEvent(uint uin, uint code, uint senderUin, uint operateUin) : base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        OperateUin = operateUin;
        Type = QQEventType.SYS_SOMEONE_DISBANNED;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 管理员
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
    /// <summary>
    /// 被禁言的人
    /// </summary>
    public uint OperateUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 群全体禁言事件
/// </summary>
public class ClusterBannedEvent : QQEvent
{
    /// <summary>
    /// 群全体禁言事件
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// <param name="senderUin">进行设置操作的管理员</param>
    public ClusterBannedEvent(uint uin, uint code, uint senderUin): base(uin)
    {
        Code = code;
        SenderUin = senderUin;
        Type = QQEventType.SYS_CLUSTER_BANNED;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 进行设置操作的管理员
    /// </summary>
    public uint SenderUin
    {
        get;
        internal set;
    }
}

/// <summary>
/// 群解禁事件
/// 超时自动解禁时不支持
/// </summary>
public class ClusterDisbannedEvent: QQEvent
{
    /// <summary>
    /// 群解禁事件
    /// 超时自动解禁时不支持
    /// </summary>
    /// <param name="uin">机器人qq号</param>
    /// <param name="code">群号</param>
    /// /// <param name="senderUin">发送者qq</param>
    public ClusterDisbannedEvent(uint uin, uint code, uint senderUin):base(uin)
    {
        Code = code;
        SenddrUin = senderUin;
        Type = QQEventType.SYS_CLUSTER_DISBANNED;
    }
    /// <summary>
    /// 群号
    /// </summary>
    public uint Code
    {
        get;
        internal set;
    }
    /// <summary>
    /// 发送者qq
    /// </summary>
    public uint SenddrUin
    {
        get;
        internal set;
    }
}
#endregion

相关文章

  • QQ事件类型

    事件类型 事件类 基类 消息类 系统通知消息

  • 【事件】事件类型

    DOM3 级事件规定了以下几类事件: UI(User Interface,用户界面)事件,当用户与页面上的元素交互...

  • jQuery(3)

    一 事件绑定 绑定 $().bind(事件类型,function(){}); $().bind(事件类型1,事件类...

  • 事件处理

    事件简介 事件类型 事件简介 事件类型(event type)例如:click、mouseover、keydown...

  • Activiti框架事件

    Activiti事件主要包含两个概念:事件类型与事件定义。事件类型分为抛出型和捕获型,事件类型描述了事件发生的位置...

  • JavaScript 事件类型,事件绑定,事件监听

    事件类型 事件绑定 事件监听 事件类型 鼠标事件: onclick:鼠标单击对象时触发 ondblclick:鼠标...

  • 事件类型

    本节介绍各种常见的浏览器事件。 鼠标事件 鼠标事件指与鼠标相关的事件,主要有以下一些。 click 事件,dblc...

  • 事件类型

    1.事件 1.1组成 1.2 事件类型 1.3 事件对象

  • DOM&BOM

    使用事件的基本结构:事件源+事件类型=执行的指令事件源事件事件处理程序 事件源事件类型驱动程序----匿名函数 事...

  • jQuery事件冒泡和默认行为

    什么是事件冒泡? 父亲和儿子都绑定了相同事件类型,儿子再相应该类型事件时,父亲也会跟着响应该类型事件。 这种事件从...

网友评论

      本文标题:QQ事件类型

      本文链接:https://www.haomeiwen.com/subject/rsowsttx.html