Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make BotJoinGroupEvent.Active and .Invite inherit BotJoinGroupEvent #532

Merged
merged 1 commit into from
Aug 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public data class BotUnmuteEvent internal constructor(
/**
* Bot 成功加入了一个新群
*/
public sealed class BotJoinGroupEvent : GroupEvent, Packet, AbstractEvent() {
public sealed class BotJoinGroupEvent : GroupEvent, BotPassiveEvent, Packet, AbstractEvent() {
public abstract override val group: Group

/**
Expand All @@ -108,7 +108,7 @@ public sealed class BotJoinGroupEvent : GroupEvent, Packet, AbstractEvent() {
@MiraiExperimentalAPI
public data class Active internal constructor(
public override val group: Group
) : BotPassiveEvent, GroupEvent, Packet, AbstractEvent() {
) : BotJoinGroupEvent() {
public override fun toString(): String = "BotJoinGroupEvent.Active(group=$group)"
}

Expand All @@ -123,7 +123,7 @@ public sealed class BotJoinGroupEvent : GroupEvent, Packet, AbstractEvent() {
* 邀请人
*/
public val invitor: Member
) : BotPassiveEvent, GroupEvent, Packet, AbstractEvent() {
) : BotJoinGroupEvent() {
public override val group: Group get() = invitor.group

public override fun toString(): String {
Expand Down