Skip to content

Commit

Permalink
feat: MemberSetTodoEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Jul 22, 2023
1 parent 2403669 commit 0babe20
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2763,6 +2763,13 @@ public final class net/mamoe/mirai/event/events/MemberPermissionChangeEvent : ne
public fun toString ()Ljava/lang/String;
}

public final class net/mamoe/mirai/event/events/MemberSetTodoEvent : net/mamoe/mirai/event/AbstractEvent, net/mamoe/mirai/event/events/BotPassiveEvent, net/mamoe/mirai/event/events/GroupMemberEvent, net/mamoe/mirai/internal/network/Packet {
public fun <init> (Lnet/mamoe/mirai/contact/NormalMember;)V
public synthetic fun getMember ()Lnet/mamoe/mirai/contact/Member;
public fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public fun toString ()Ljava/lang/String;
}

public final class net/mamoe/mirai/event/events/MemberSpecialTitleChangeEvent : net/mamoe/mirai/event/AbstractEvent, net/mamoe/mirai/event/events/GroupMemberEvent, net/mamoe/mirai/event/events/GroupMemberInfoChangeEvent, net/mamoe/mirai/event/events/GroupOperableEvent, net/mamoe/mirai/internal/network/Packet {
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
Expand Down
7 changes: 7 additions & 0 deletions mirai-core-api/compatibility-validation/jvm/api/jvm.api
Original file line number Diff line number Diff line change
Expand Up @@ -2763,6 +2763,13 @@ public final class net/mamoe/mirai/event/events/MemberPermissionChangeEvent : ne
public fun toString ()Ljava/lang/String;
}

public final class net/mamoe/mirai/event/events/MemberSetTodoEvent : net/mamoe/mirai/event/AbstractEvent, net/mamoe/mirai/event/events/BotPassiveEvent, net/mamoe/mirai/event/events/GroupMemberEvent, net/mamoe/mirai/internal/network/Packet {
public fun <init> (Lnet/mamoe/mirai/contact/NormalMember;)V
public synthetic fun getMember ()Lnet/mamoe/mirai/contact/Member;
public fun getMember ()Lnet/mamoe/mirai/contact/NormalMember;
public fun toString ()Ljava/lang/String;
}

public final class net/mamoe/mirai/event/events/MemberSpecialTitleChangeEvent : net/mamoe/mirai/event/AbstractEvent, net/mamoe/mirai/event/events/GroupMemberEvent, net/mamoe/mirai/event/events/GroupMemberInfoChangeEvent, net/mamoe/mirai/event/events/GroupOperableEvent, net/mamoe/mirai/internal/network/Packet {
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
Expand Down
14 changes: 14 additions & 0 deletions mirai-core-api/src/commonMain/kotlin/event/events/group.kt
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,20 @@ public class MemberLuckyWordEvent(

// region 群待办

/**
* [Member] 设置群待办事件
*/
public class MemberSetTodoEvent(
/**
* 设置群待办的群成员
*/
public override val member: NormalMember,
) : Packet, GroupMemberEvent, BotPassiveEvent, AbstractEvent() {
override fun toString(): String {
return "MemberSetTodoEvent(group=${group.id}, member=${member.id})"
}
}

/**
* [Member] 完成群待办事件,可能会在成员阅读完群待办(公告)时触发
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ internal class GroupNotificationProcessor(
// 群待办
10134L, 10135L -> {
val user = grayTip.msgTemplParam["uin"]?.findMember() ?: group.botAsMember
collected += MemberCompleteTodoEvent(member = user)
when (grayTip.templId) {
10134L -> collected += MemberSetTodoEvent(member = user)
10135L -> collected += MemberCompleteTodoEvent(member = user)
}
}
// 龙王
10093L, 10094L, 1053L, 1054L, 1103L -> {
Expand Down

0 comments on commit 0babe20

Please sign in to comment.