From f1a5bc05ea245e01937bd7ac5e077b730fe48f8c Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 31 Jan 2020 22:00:38 +0800 Subject: [PATCH] Add docs --- .../kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt | 2 ++ .../src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt index f1ff2c865..35042adef 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt @@ -49,6 +49,8 @@ abstract class BotNetworkHandler : CoroutineScope { /** * 初始化获取好友列表等值. + * + * 不要使用这个 API. 它会在登录完成后被自动调用. */ @MiraiInternalAPI open suspend fun init() { diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt index 0e37a2827..4796b2278 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt @@ -20,7 +20,14 @@ internal val factory: BotFactory = run { No BotFactory found. Please ensure that you've added dependency of protocol modules. Available modules: - net.mamoe:mirai-core-timpc + - net.mamoe:mirai-core-qqandroid (recommended) You should have at lease one protocol module installed. + ------------------------------------------------------- + 找不到 BotFactory. 请确保你依赖了至少一个协议模块. + 可用的协议模块: + - net.mamoe:mirai-core-timpc + - net.mamoe:mirai-core-qqandroid (推荐) + 请添加上述任一模块的依赖(与 mirai-core 版本相同) """.trimIndent() )