mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 23:20:09 +08:00
Make uin not final
This commit is contained in:
parent
b8b1f4cc2a
commit
008b6e935d
@ -13,6 +13,7 @@ import kotlin.coroutines.CoroutineContext
|
|||||||
/*
|
/*
|
||||||
* 泛型 N 不需要向外(接口)暴露.
|
* 泛型 N 不需要向外(接口)暴露.
|
||||||
*/
|
*/
|
||||||
|
@UseExperimental(MiraiExperimentalAPI::class)
|
||||||
@MiraiInternalAPI
|
@MiraiInternalAPI
|
||||||
abstract class BotImpl<N : BotNetworkHandler> constructor(
|
abstract class BotImpl<N : BotNetworkHandler> constructor(
|
||||||
account: BotAccount,
|
account: BotAccount,
|
||||||
@ -25,8 +26,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
|
|||||||
|
|
||||||
@Suppress("CanBePrimaryConstructorProperty") // for logger
|
@Suppress("CanBePrimaryConstructorProperty") // for logger
|
||||||
final override val account: BotAccount = account
|
final override val account: BotAccount = account
|
||||||
@UseExperimental(MiraiExperimentalAPI::class)
|
override val uin: Long
|
||||||
final override val uin: Long
|
|
||||||
get() = account.id
|
get() = account.id
|
||||||
final override val logger: MiraiLogger = configuration.logger ?: DefaultLogger("Bot($uin)").also { configuration.logger = it }
|
final override val logger: MiraiLogger = configuration.logger ?: DefaultLogger("Bot($uin)").also { configuration.logger = it }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user