Active

data class Active(bot: Bot, cause: Throwable?) : BotOfflineEvent, BotActiveEvent, BotOfflineEvent.CauseAware

主动离线.

在调用 Bot.close 时, 如果 Bot 连接正常, 将会广播 Active.

主动广播这个事件也可以让 Bot 离线, 但不建议这么做. 建议调用 Bot.close.

Constructors

Active
Link copied to clipboard
fun Active(bot: Bot, cause: Throwable?)

Functions

cancel
Link copied to clipboard
fun cancel()
intercept
Link copied to clipboard
abstract fun intercept()

拦截这个事件

toString
Link copied to clipboard
open override fun toString(): String

Properties

bot
Link copied to clipboard
open override val bot: Bot
cause
Link copied to clipboard
open override val cause: Throwable?
isCancelled
Link copied to clipboard
val isCancelled: Boolean
isIntercepted
Link copied to clipboard
abstract val isIntercepted: Boolean

事件是否已被拦截.

reconnect
Link copied to clipboard
open override val reconnect: Boolean

true 时会尝试重连. 仅 BotOfflineEvent.Force 默认为 false, 其他默认为 true.