mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-19 20:59:10 +08:00
Add BotOfflineEvent.Dropped
and BotReloginEvent
This commit is contained in:
parent
1f6d81314a
commit
98b0073f81
@ -42,19 +42,32 @@ data class BotOnlineEvent(override val bot: Bot) : BotActiveEvent
|
|||||||
/**
|
/**
|
||||||
* [Bot] 离线.
|
* [Bot] 离线.
|
||||||
*/
|
*/
|
||||||
sealed class BotOfflineEvent : BotActiveEvent {
|
sealed class BotOfflineEvent : BotEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主动离线
|
* 主动离线
|
||||||
*/
|
*/
|
||||||
data class Active(override val bot: Bot, val cause: Throwable?) : BotOfflineEvent()
|
data class Active(override val bot: Bot, val cause: Throwable?) : BotOfflineEvent(), BotActiveEvent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 被挤下线
|
* 被挤下线
|
||||||
*/
|
*/
|
||||||
data class Force(override val bot: Bot, val title: String, val message: String) : BotOfflineEvent(), Packet
|
data class Force(override val bot: Bot, val title: String, val message: String) : BotOfflineEvent(), Packet, BotPassiveEvent
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被服务器断开或因网络问题而掉线
|
||||||
|
*/
|
||||||
|
data class Dropped(override val bot: Bot) : BotOfflineEvent(), Packet, BotPassiveEvent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [Bot] 主动重新登录.
|
||||||
|
*/
|
||||||
|
data class BotReloginEvent(
|
||||||
|
override val bot: Bot,
|
||||||
|
val cause: Throwable?
|
||||||
|
) : BotEvent, BotActiveEvent
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region 消息
|
// region 消息
|
||||||
|
Loading…
Reference in New Issue
Block a user