mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-07 16:40:43 +08:00
Make classes sealed: MessageEvent
, UserMessageEvent
, GroupAwareMessageEvent
This commit is contained in:
parent
13484c7a7a
commit
a34c11f239
@ -30,7 +30,7 @@ import net.mamoe.mirai.utils.MiraiInternalApi
|
||||
*
|
||||
* @see isContextIdenticalWith 判断语境相同
|
||||
*/
|
||||
public interface MessageEvent : Event, Packet, BotPassiveEvent { // TODO: 2021/1/11 Make sealed interface in Kotlin 1.5
|
||||
public sealed interface MessageEvent : Event, Packet, BotPassiveEvent {
|
||||
/**
|
||||
* 与这个消息事件相关的 [Bot]
|
||||
*/
|
||||
@ -85,7 +85,7 @@ public interface MessageEvent : Event, Packet, BotPassiveEvent { // TODO: 2021/1
|
||||
* @see FriendMessageEvent
|
||||
* @see GroupTempMessageEvent
|
||||
*/
|
||||
public interface UserMessageEvent : MessageEvent {
|
||||
public sealed interface UserMessageEvent : MessageEvent {
|
||||
public override val subject: User
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ public class OtherClientMessageEvent constructor(
|
||||
* @see FriendMessageEvent
|
||||
* @see GroupTempMessageEvent
|
||||
*/
|
||||
public interface GroupAwareMessageEvent : MessageEvent {
|
||||
public sealed interface GroupAwareMessageEvent : MessageEvent {
|
||||
public val group: Group
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user