From 2fd8929add6e2bc68b1585e2ff7c5007a665d253 Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 2 Mar 2023 12:46:31 +0000 Subject: [PATCH] Make `BotAccount.` with String password parameter TestOnly --- mirai-core/src/commonMain/kotlin/BotAccount.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mirai-core/src/commonMain/kotlin/BotAccount.kt b/mirai-core/src/commonMain/kotlin/BotAccount.kt index df0e185fb..c05e1e959 100644 --- a/mirai-core/src/commonMain/kotlin/BotAccount.kt +++ b/mirai-core/src/commonMain/kotlin/BotAccount.kt @@ -12,12 +12,14 @@ package net.mamoe.mirai.internal import net.mamoe.mirai.auth.BotAuthorization import net.mamoe.mirai.utils.SecretsProtection +import net.mamoe.mirai.utils.TestOnly internal class BotAccount( internal val id: Long, val authorization: BotAuthorization, ) { + @TestOnly // to be compatible with your local tests :) constructor( id: Long, pwd: String ) : this(id, BotAuthorization.byPassword(pwd))