Skip to content

Commit df5f6f9

Browse files
authored
Merge pull request #185 from simple-robot/dev/fix-internal-event-inherited
fix: 修复部分错误的/缺失的事件继承关系
2 parents ee21c13 + 4d02dbb commit df5f6f9

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

buildSrc/src/main/kotlin/P.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024. ForteScarlet.
2+
* Copyright (c) 2023-2025. ForteScarlet.
33
*
44
* This file is part of simbot-component-onebot.
55
*
@@ -37,7 +37,7 @@ object P {
3737
override val description: String get() = DESCRIPTION
3838
override val homepage: String get() = HOMEPAGE
3939

40-
const val VERSION = "1.6.0"
40+
const val VERSION = "1.6.1"
4141
const val NEXT_VERSION = "1.6.1"
4242

4343
override val snapshotVersion = "$NEXT_VERSION-SNAPSHOT"

simbot-component-onebot-v11/simbot-component-onebot-v11-core/api/simbot-component-onebot-v11-core.api

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,7 +2390,7 @@ public abstract interface class love/forte/simbot/component/onebot/v11/core/even
23902390
public abstract fun getContent ()Llove/forte/simbot/component/onebot/v11/core/event/message/OneBotGroupPrivateMessageEvent;
23912391
}
23922392

2393-
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotInternalMessageInteractionEvent : love/forte/simbot/event/InternalMessageInteractionEvent {
2393+
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotInternalMessageInteractionEvent : love/forte/simbot/component/onebot/v11/core/event/OneBotInternalEvent, love/forte/simbot/event/InternalMessageInteractionEvent {
23942394
}
23952395

23962396
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotInternalMessagePostSendEvent : love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotInternalMessageInteractionEvent, love/forte/simbot/event/InternalMessagePostSendEvent {
@@ -2490,11 +2490,11 @@ public abstract interface class love/forte/simbot/component/onebot/v11/core/even
24902490
public abstract fun getContent ()Llove/forte/simbot/ability/SendSupport;
24912491
}
24922492

2493-
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportPostSendEvent : love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportInteractionEvent, love/forte/simbot/event/SendSupportPostSendEvent {
2493+
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportPostSendEvent : love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotInternalMessagePostSendEvent, love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportInteractionEvent, love/forte/simbot/event/SendSupportPostSendEvent {
24942494
public abstract fun getMessage ()Llove/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSegmentsInteractionMessage;
24952495
}
24962496

2497-
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportPreSendEvent : love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportInteractionEvent, love/forte/simbot/event/SendSupportPreSendEvent {
2497+
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportPreSendEvent : love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotInternalMessagePreSendEvent, love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportInteractionEvent, love/forte/simbot/event/SendSupportPreSendEvent {
24982498
}
24992499

25002500
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/meta/OneBotHeartbeatEvent : love/forte/simbot/component/onebot/v11/core/event/meta/OneBotMetaEvent {
@@ -2804,7 +2804,7 @@ public abstract interface class love/forte/simbot/component/onebot/v11/core/even
28042804
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/stage/OneBotBotRegisteredEvent : love/forte/simbot/component/onebot/v11/core/event/stage/OneBotBotStageEvent, love/forte/simbot/event/BotRegisteredEvent {
28052805
}
28062806

2807-
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/stage/OneBotBotStageEvent : love/forte/simbot/component/onebot/v11/core/event/OneBotCommonEvent, love/forte/simbot/event/BotStageEvent {
2807+
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/stage/OneBotBotStageEvent : love/forte/simbot/component/onebot/v11/core/event/OneBotInternalEvent, love/forte/simbot/event/BotStageEvent {
28082808
public abstract fun getBot ()Llove/forte/simbot/component/onebot/v11/core/bot/OneBotBot;
28092809
}
28102810

simbot-component-onebot-v11/simbot-component-onebot-v11-core/src/commonMain/kotlin/love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotInternalMessageInteractionEvent.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package love.forte.simbot.component.onebot.v11.core.event.messageinteraction
1919

20+
import love.forte.simbot.component.onebot.v11.core.event.OneBotInternalEvent
2021
import love.forte.simbot.event.FuzzyEventTypeImplementation
2122
import love.forte.simbot.event.InternalMessageInteractionEvent
2223
import love.forte.simbot.event.InternalMessagePostSendEvent
@@ -31,7 +32,7 @@ import love.forte.simbot.message.Message
3132
* @author ForteScarlet
3233
*/
3334
@SubclassOptInRequired(FuzzyEventTypeImplementation::class)
34-
public interface OneBotInternalMessageInteractionEvent : InternalMessageInteractionEvent
35+
public interface OneBotInternalMessageInteractionEvent : OneBotInternalEvent, InternalMessageInteractionEvent
3536

3637
/**
3738
* OneBot 组件针对消息发送前的拦截事件。

simbot-component-onebot-v11/simbot-component-onebot-v11-core/src/commonMain/kotlin/love/forte/simbot/component/onebot/v11/core/event/messageinteraction/OneBotSendSupportInteractionEvent.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ public interface OneBotSendSupportInteractionEvent :
5252
* @author ForteScarlet
5353
*/
5454
@SubclassOptInRequired(FuzzyEventTypeImplementation::class)
55-
public interface OneBotSendSupportPreSendEvent : SendSupportPreSendEvent, OneBotSendSupportInteractionEvent
55+
public interface OneBotSendSupportPreSendEvent :
56+
SendSupportPreSendEvent,
57+
OneBotInternalMessagePreSendEvent,
58+
OneBotSendSupportInteractionEvent
5659

5760
/**
5861
* OneBot组件中针对 [SendSupport.send] 的通知事件。
@@ -62,7 +65,10 @@ public interface OneBotSendSupportPreSendEvent : SendSupportPreSendEvent, OneBot
6265
* @author ForteScarlet
6366
*/
6467
@SubclassOptInRequired(FuzzyEventTypeImplementation::class)
65-
public interface OneBotSendSupportPostSendEvent : SendSupportPostSendEvent, OneBotSendSupportInteractionEvent {
68+
public interface OneBotSendSupportPostSendEvent :
69+
SendSupportPostSendEvent,
70+
OneBotInternalMessagePostSendEvent,
71+
OneBotSendSupportInteractionEvent {
6672
override val message: OneBotSegmentsInteractionMessage
6773
}
6874

simbot-component-onebot-v11/simbot-component-onebot-v11-core/src/commonMain/kotlin/love/forte/simbot/component/onebot/v11/core/event/stage/OneBotBotStageEvent.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024. ForteScarlet.
2+
* Copyright (c) 2024-2025. ForteScarlet.
33
*
44
* This file is part of simbot-component-onebot.
55
*
@@ -19,7 +19,7 @@ package love.forte.simbot.component.onebot.v11.core.event.stage
1919

2020
import love.forte.simbot.bot.BotManager
2121
import love.forte.simbot.component.onebot.v11.core.bot.OneBotBot
22-
import love.forte.simbot.component.onebot.v11.core.event.OneBotCommonEvent
22+
import love.forte.simbot.component.onebot.v11.core.event.OneBotInternalEvent
2323
import love.forte.simbot.event.BotRegisteredEvent
2424
import love.forte.simbot.event.BotStageEvent
2525
import love.forte.simbot.event.BotStartedEvent
@@ -32,7 +32,7 @@ import love.forte.simbot.event.FuzzyEventTypeImplementation
3232
* @author ForteScarlet
3333
*/
3434
@SubclassOptInRequired(FuzzyEventTypeImplementation::class)
35-
public interface OneBotBotStageEvent : BotStageEvent, OneBotCommonEvent {
35+
public interface OneBotBotStageEvent : BotStageEvent, OneBotInternalEvent {
3636
override val bot: OneBotBot
3737
}
3838

0 commit comments

Comments
 (0)