Don't introduce new file BotConfigurationKt but merge into existing Utils (affected: top-level fun BotConfiguration). apiDump

This commit is contained in:
Him188 2021-02-01 09:21:46 +08:00
parent 622cf31175
commit 2a7f0a3a8f
2 changed files with 7 additions and 2 deletions

View File

@ -5862,6 +5862,7 @@ public final class net/mamoe/mirai/utils/SwingSolver : net/mamoe/mirai/utils/Log
}
public final class net/mamoe/mirai/utils/Utils {
public static final synthetic fun BotConfiguration (Lkotlin/jvm/functions/Function1;)Lnet/mamoe/mirai/utils/BotConfiguration;
public static final fun debug (Lnet/mamoe/mirai/utils/MiraiLogger;Lkotlin/jvm/functions/Function0;)V
public static final fun debug (Lnet/mamoe/mirai/utils/MiraiLogger;Lkotlin/jvm/functions/Function0;Ljava/lang/Throwable;)V
public static final fun error (Lnet/mamoe/mirai/utils/MiraiLogger;Lkotlin/jvm/functions/Function0;)V

View File

@ -9,6 +9,10 @@
@file:Suppress("unused", "DEPRECATION_ERROR", "EXPOSED_SUPER_CLASS", "MemberVisibilityCanBePrivate")
@file:JvmMultifileClass
@file:JvmName("Utils")
package net.mamoe.mirai.utils
import kotlinx.coroutines.Job
@ -392,15 +396,15 @@ public open class BotConfiguration { // open for Java
* 构建一个 [BotConfiguration].
*
* @see BotConfiguration
* @since 2.3
*/
@JvmSynthetic
public inline fun BotConfiguration(block: BotConfiguration.() -> Unit): BotConfiguration {
return BotConfiguration().apply(block)
}
internal val deviceInfoStub: (Bot) -> DeviceInfo = {
@Suppress("DEPRECATION")
MiraiLogger.TopLevel.warning("未指定设备信息, 已使用随机设备信息. 请查看 BotConfiguration.deviceInfo 以获取更多信息.")
@Suppress("DEPRECATION")
MiraiLogger.TopLevel.warning("Device info isn't specified. Please refer to BotConfiguration.deviceInfo for more information")
DeviceInfo.random()
}