Skip to content

Commit 978651d

Browse files
committed
pref(core): 清理 MiraiGroupSettingEvents.kt 中计划删除的过时API
1 parent 98614ea commit 978651d

File tree

1 file changed

+21
-48
lines changed

1 file changed

+21
-48
lines changed

simbot-component-mirai-core/src/main/kotlin/love/forte/simbot/component/mirai/event/MiraiGroupSettingEvents.kt

Lines changed: 21 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import love.forte.simbot.event.BaseEventKey
2424
import love.forte.simbot.event.ChangedEvent
2525
import love.forte.simbot.event.Event
2626
import love.forte.simbot.message.doSafeCast
27-
import org.jetbrains.annotations.ApiStatus
2827
import net.mamoe.mirai.event.events.GroupAllowAnonymousChatEvent as OriginalMiraiGroupAllowAnonymousChatEvent
2928
import net.mamoe.mirai.event.events.GroupAllowConfessTalkEvent as OriginalMiraiGroupAllowConfessTalkEvent
3029
import net.mamoe.mirai.event.events.GroupAllowMemberInviteEvent as OriginalMiraiGroupAllowMemberInviteEvent
@@ -42,7 +41,6 @@ import net.mamoe.mirai.event.events.GroupSettingChangeEvent as OriginalMiraiGrou
4241
* 参考 `net.mamoe.mirai.event.events.group.kt`.
4342
*
4443
* @see MiraiGroupNameChangeEvent
45-
* @see MiraiGroupEntranceAnnouncementChangeEvent
4644
* @see MiraiGroupMuteAllEvent
4745
* @see MiraiGroupAllowAnonymousChatEvent
4846
* @see MiraiGroupAllowConfessTalkEvent
@@ -53,25 +51,25 @@ import net.mamoe.mirai.event.events.GroupSettingChangeEvent as OriginalMiraiGrou
5351
@JvmAsync(asProperty = true)
5452
public interface MiraiGroupSettingEvent<T, E : OriginalMiraiGroupSettingChangeEvent<T>> : MiraiSimbotBotEvent<E>,
5553
ChangedEvent {
56-
54+
5755
override val bot: MiraiBot
58-
56+
5957
/**
6058
* 涉及群。
6159
*/
6260
override suspend fun source(): MiraiGroup
63-
61+
6462
/**
6563
* 变更前值
6664
*/
6765
override suspend fun before(): T
68-
66+
6967
/**
7068
* 变更后值
7169
*/
7270
override suspend fun after(): T
73-
74-
71+
72+
7573
public companion object Key : BaseEventKey<MiraiGroupSettingEvent<*, *>>(
7674
"mirai.group_setting", MiraiSimbotBotEvent, ChangedEvent
7775
) {
@@ -89,56 +87,31 @@ public interface MiraiGroupNameChangeEvent : MiraiGroupSettingEvent<String, Orig
8987
* 操作者。
9088
*/
9189
public val operator: MiraiMember
92-
93-
90+
91+
9492
override val key: Event.Key<MiraiGroupNameChangeEvent> get() = Key
95-
93+
9694
public companion object Key : BaseEventKey<MiraiGroupNameChangeEvent>(
9795
"mirai.group_name_change", MiraiGroupSettingEvent
9896
) {
9997
override fun safeCast(value: Any): MiraiGroupNameChangeEvent? = doSafeCast(value)
10098
}
10199
}
102100

103-
/**
104-
* 入群公告改变.
105-
* @see net.mamoe.mirai.event.events.GroupEntranceAnnouncementChangeEvent
106-
*/
107-
@Suppress("DEPRECATION", "DEPRECATION_ERROR")
108-
@Deprecated("This event (net.mamoe.mirai.event.events.GroupEntranceAnnouncementChangeEvent) is not being triggered anymore.", level = DeprecationLevel.ERROR)
109-
@ApiStatus.ScheduledForRemoval(inVersion = "3.0.0.0")
110-
public interface MiraiGroupEntranceAnnouncementChangeEvent :
111-
MiraiGroupSettingEvent<String, net.mamoe.mirai.event.events.GroupEntranceAnnouncementChangeEvent> {
112-
113-
/**
114-
* 操作者。
115-
*/
116-
public val operator: MiraiMember
117-
118-
119-
override val key: Event.Key<MiraiGroupEntranceAnnouncementChangeEvent> get() = Key
120-
121-
public companion object Key : BaseEventKey<MiraiGroupEntranceAnnouncementChangeEvent>(
122-
"mirai.group_entrance_announcement", MiraiGroupSettingEvent
123-
) {
124-
override fun safeCast(value: Any): MiraiGroupEntranceAnnouncementChangeEvent? = doSafeCast(value)
125-
}
126-
}
127-
128101
/**
129102
* 群 "全员禁言" 功能状态改变
130103
* @see OriginalMiraiGroupMuteAllEvent
131104
*/
132105
public interface MiraiGroupMuteAllEvent : MiraiGroupSettingEvent<Boolean, OriginalMiraiGroupMuteAllEvent> {
133-
106+
134107
/**
135108
* 操作者。
136109
*/
137110
public val operator: MiraiMember
138-
139-
111+
112+
140113
override val key: Event.Key<MiraiGroupMuteAllEvent> get() = Key
141-
114+
142115
public companion object Key : BaseEventKey<MiraiGroupMuteAllEvent>(
143116
"mirai.group_mute_all", MiraiGroupSettingEvent
144117
) {
@@ -152,14 +125,14 @@ public interface MiraiGroupMuteAllEvent : MiraiGroupSettingEvent<Boolean, Origin
152125
*/
153126
public interface MiraiGroupAllowAnonymousChatEvent :
154127
MiraiGroupSettingEvent<Boolean, OriginalMiraiGroupAllowAnonymousChatEvent> {
155-
128+
156129
/**
157130
* 操作者。
158131
*/
159132
public val operator: MiraiMember
160-
133+
161134
override val key: Event.Key<MiraiGroupAllowAnonymousChatEvent> get() = Key
162-
135+
163136
public companion object Key : BaseEventKey<MiraiGroupAllowAnonymousChatEvent>(
164137
"mirai.group_allow_anonymous_chat", MiraiGroupSettingEvent
165138
) {
@@ -173,9 +146,9 @@ public interface MiraiGroupAllowAnonymousChatEvent :
173146
*/
174147
public interface MiraiGroupAllowConfessTalkEvent :
175148
MiraiGroupSettingEvent<Boolean, OriginalMiraiGroupAllowConfessTalkEvent> {
176-
149+
177150
override val key: Event.Key<MiraiGroupAllowConfessTalkEvent> get() = Key
178-
151+
179152
public companion object Key : BaseEventKey<MiraiGroupAllowConfessTalkEvent>(
180153
"mirai.group_allow_confess_talk", MiraiGroupSettingEvent
181154
) {
@@ -189,14 +162,14 @@ public interface MiraiGroupAllowConfessTalkEvent :
189162
*/
190163
public interface MiraiGroupAllowMemberInviteEvent :
191164
MiraiGroupSettingEvent<Boolean, OriginalMiraiGroupAllowMemberInviteEvent> {
192-
165+
193166
/**
194167
* 操作者。
195168
*/
196169
public val operator: MiraiMember
197-
170+
198171
override val key: Event.Key<MiraiGroupAllowMemberInviteEvent> get() = Key
199-
172+
200173
public companion object Key : BaseEventKey<MiraiGroupAllowMemberInviteEvent>(
201174
"mirai.group_allow_member_invite", MiraiGroupSettingEvent
202175
) {

0 commit comments

Comments
 (0)