예제 #1
0
    def __init__(self, member: Member):
        """
        构造方法

        :param member: 新成员信息
        """
        Event.__init__(self)
        self.type = MEMBER_JOIN_EVENT
        self.member = member
예제 #2
0
    def __init__(self, qq: int):
        """
        构造方法

        :param qq: 主动离线的QQ号
        """
        Event.__init__(self)
        self.type = BOT_OFFLINE_ACTIVE_EVENT
        self.qq = qq
예제 #3
0
    def __init__(self, qq: int):
        """
        构造方法

        :param qq: 主动重新登录的Bot的QQ
        """
        Event.__init__(self)
        self.type = BOT_RELOGIN_EVENT
        self.qq = qq
예제 #4
0
    def __init__(self, qq: int):
        """
        构造方法

        :param qq: 被挤下线的QQ号
        """
        Event.__init__(self),
        self.type = BOT_OFFLINE_FORCE_EVENT
        self.qq = qq
예제 #5
0
    def __init__(self, qq: int):
        """
        构造方法

        :param qq: 登录成功的Bot的QQ号
        """
        Event.__init__(self)
        self.type = BOT_ONLINE_EVENT
        self.qq = qq
예제 #6
0
    def __init__(self, operator: Member):
        """
        构造方法

        :param operator: 操作者信息
        """
        Event.__init__(self)
        self.type = BOT_UNMUTE_EVENT
        self.operator = operator
예제 #7
0
    def __init__(self, qq: int):
        """
        构造方法

        :param qq: 被服务器断开或因网络问题而掉线的Bot的QQ号
        """
        Event.__init__(self)
        self.type = BOT_OFFLINE_DROPPED_EVENT
        self.qq = qq
예제 #8
0
    def __init__(self, group: Group):
        """
        构造方法

        :param group: 群信息
        """
        Event.__init__(self)
        self.type = BOT_LEAVE_KICK_EVENT
        self.group = group
예제 #9
0
    def __init__(self, member: Member):
        """
        构造方法

        :param member: 成员
        """
        Event.__init__(self)
        self.type = MEMBER_LEAVE_QUIT_EVENT
        self.member = member
예제 #10
0
 def __init__(self, group: Group):
     """
     构造方法
     :param group: 群号
     :param group_name: 群名
     :param group_permission: Bot在群中的权限
     """
     Event.__init__(self)
     self.type = BOT_JOIN_GROUP_EVENT
     self.group = group
예제 #11
0
    def __init__(self, member: Member, operator: Member):
        """
        构造方法

        :param member: 被操作者信息
        :param operator: 操作者信息,为null表示bot
        """
        Event.__init__(self)
        self.type = MEMBER_UNMUTE_EVENT
        self.member = member
        self.operator = operator
예제 #12
0
    def __init__(self, duration_seconds: int, operator: Member):
        """
        构造方法

        :param duration_seconds: 禁言时间
        :param operator: 操作者信息
        """
        Event.__init__(self)
        self.type = BOT_MUTE_EVENT
        self.duration_seconds = duration_seconds
        self.operator = operator
예제 #13
0
    def __init__(self, member: Member, operator: Member):
        """
        构造方法

        :param member: 被踢成员
        :param operator: 操作成员
        """
        Event.__init__(self)
        self.type = MEMBER_LEAVE_KICK_EVENT
        self.member = member
        self.operator = operator
예제 #14
0
    def __init__(self, duration_seconds: int, member: Member,
                 operator: Member):
        """
        构造方法

        :param duration_seconds: 禁言时间,单位为秒
        :param member: 被禁成员
        :param operator: 操作者,为null为bot操作
        """
        Event.__init__(self)
        self.type = MEMBER_MUTE_EVENT
        self.duration_seconds = duration_seconds
        self.member = member
        self.operator = operator
예제 #15
0
    def __init__(self, origin: str, new: str, current: str, member: Member):
        """
        构造方法

        :param origin: 原权限
        :param new: 新权限
        :param current: 新权限
        :param member: 被操作成员信息
        """
        Event.__init__(self)
        self.type = MEMBER_PERMISSION_CHANGE_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.member = member
예제 #16
0
    def __init__(self, origin: str, new: str, current: str, group: Group):
        """
        构造方法

        :param origin: Bot的原权限
        :param new: Bot的新权限
        :param current: Bot的新权限
        :param group: 群信息对象
        """
        Event.__init__(self)
        self.type = BOT_GROUP_PERMISSION_CHANGE_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.group = group
예제 #17
0
    def __init__(self, origin: str, new: str, current: str, member: Member):
        """
        构造方法

        :param origin: 原头衔
        :param new: 现头衔
        :param current: 现头衔
        :param member: 被改动的成员信息
        """
        Event.__init__(self)
        self.type = MEMBER_SPECIAL_TITLE_CHANGE_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.member = member
예제 #18
0
    def __init__(self, author_qq: int, message_id: int, time: int,
                 operator_qq: int):
        """
        构造方法

        :param author_qq: 原消息发送者qq
        :param message_id: 原消息id
        :param time: 原消息发送时间
        :param operator_qq: 好友qq或者botqq(???原文档是这么写的啊)
        """
        Event.__init__(self)
        self.type = FRIEND_RECALL_EVENT
        self.author_qq = author_qq
        self.message_id = message_id
        self.time = time
        self.operator_qq = operator_qq
예제 #19
0
    def __init__(self, origin: bool, new: bool, current: bool, group: Group,
                 operator: Member):
        """
        构造方法

        :param origin: 原本是否处于全员禁言
        :param new: 现在是否处于全员禁言
        :param current: 现在是否处于全员禁言
        :param group: 群信息
        :param operator: 操作者信息
        """
        Event.__init__(self)
        self.type = GROUP_MUTE_ALL_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.group = group
        self.operator = operator
예제 #20
0
    def __init__(self, origin: str, new: str, current: str, group: Group,
                 operator: Member):
        """
        构造方法

        :param origin: 原群名
        :param new: 新群名
        :param current: 新群名
        :param group: 改名的群信息
        :param operator: 操作者信息
        """
        Event.__init__(self)
        self.type = GROUP_NAME_CHANGE_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.group = group
        self.operator = operator
예제 #21
0
    def __init__(self, origin: str, new: str, current: str, member: Member,
                 operator: Member):
        """
        构造方法

        :param origin: 原来的群名片
        :param new: 新的群名片
        :param current: 新的群名片
        :param member: 被操作者信息
        :param operator: 操作者信息,可以是自己也可以是管理,为null时表示bot
        """
        Event.__init__(self)
        self.type = MEMBER_CARD_CHANGE_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.member = member
        self.operator = operator
예제 #22
0
    def __init__(self, origin: str, new: str, current: str, group: Group,
                 operator: Member):
        """
        构造方法

        :param origin: 原公告
        :param new: 新公告
        :param current: 新公告
        :param group: 公告改变的群信息
        :param operator: 操作者信息
        """
        Event.__init__(self)
        self.type = GROUP_ENTRANCE_ANNOUNCEMENT_CHANGE_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.group = group
        self.operator = operator
예제 #23
0
    def __init__(self, origin: bool, new: bool, current: bool, group: Group,
                 operator: Member):
        """
        构造方法

        :param origin: 原本匿名聊天是否开启
        :param new: 现在匿名聊天是否开启
        :param current: 现在匿名聊天是否开启
        :param group: 群信息
        :param operator: 操作者信息
        """
        Event.__init__(self)
        self.type = GROUP_ALLOW_ANONYMOUS_CHAT_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.group = group
        self.operator = operator
예제 #24
0
    def __init__(self, origin: bool, new: bool, current: bool, group: Group,
                 operator: Member):
        """
        构造方法

        :param origin: 原本是否允许群员邀请好友加群
        :param new: 现在是否允许
        :param current: 现在是否允许
        :param group: 群信息
        :param operator: 操作者信息
        """
        Event.__init__(self)
        self.type = GROUP_ALLOW_MEMBER_INVITE_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.group = group
        self.operator = operator
예제 #25
0
    def __init__(self, event_id: int, from_qq: int, group_id: int, nick: str,
                 message: str):
        """
        构造方法

        :param event_id: 事件id,响应时用其标识
        :param from_qq: 申请人qq
        :param group_id: 申请人如果通过某个群加好友,则该项为群号,否则为0
        :param nick: 申请人的昵称或群名片
        :param message: 申请消息
        """
        Event.__init__(self)
        self.type = NEW_FRIEND_REQUEST_EVENT
        self.event_id = event_id
        self.from_qq = from_qq
        self.group_id = group_id
        self.nick = nick
        self.message = message
예제 #26
0
    def __init__(self, origin: bool, new: bool, current: bool, group: Group,
                 is_by_bot: bool):
        """
        构造方法

        :param origin: 原本坦白说是否开启
        :param new: 现在坦白说是否开启
        :param current: 现在坦白说是否开启
        :param group: 群消息
        :param is_by_bot: 是否bot进行该操作
        """
        Event.__init__(self)
        self.type = GROUP_ALLOW_CONFESS_TALK_EVENT
        self.origin = origin
        self.new = new
        self.current = current
        self.group = group
        self.is_by_bot = is_by_bot
예제 #27
0
    def __init__(self, author_qq: int, message_id: int, time: int,
                 group: Group, operator: Member):
        """
        构造方法

        :param author_qq: 原消息发送者的QQ号
        :param message_id: 原消息id
        :param time: 原消息发送时间
        :param group: 消息撤回所在的群
        :param operator: 撤回消息的操作人,为null的时候表示bot本身
        """
        Event.__init__(self)
        self.type = GROUP_RECALL_EVENT
        self.author_qq = author_qq
        self.message_id = message_id
        self.time = time
        self.group = group
        self.operator = operator
예제 #28
0
    def __init__(self, event_id: int, from_qq: int, group_id: int,
                 group_name: str, nick: str, message: str):
        """
        构造方法

        :param event_id: 事件号
        :param from_qq: 邀请人qq
        :param group_id: 被邀请进入的群号
        :param group_name: 被邀请进入的群名
        :param nick: 邀请人昵称
        :param message: 邀请消息
        """
        Event.__init__(self)
        self.type = BOT_INVITED_JOIN_GROUP_REQUEST_EVENT
        self.event_id = event_id
        self.from_qq = from_qq
        self.group_id = group_id
        self.group_name = group_name
        self.nick = nick
        self.message = message
예제 #29
0
    def __init__(self, event_id: int, from_qq: int, group_id: int,
                 group_name: str, nick: str, message: str):
        """
        构造方法

        :param event_id: 事件号
        :param from_qq: 申请人qq
        :param group_id: 申请进入的群号
        :param group_name: 群名称
        :param nick: 申请人昵称或群名片
        :param message: 申请消息
        :return:
        """
        Event.__init__(self)
        self.type = MEMBER_JOIN_REQUEST_EVENT
        self.event_id = event_id
        self.from_qq = from_qq
        self.group_id = group_id
        self.group_name = group_name
        self.nick = nick
        self.message = message