Make BotAccount.<init> with String password parameter TestOnly

This commit is contained in:
Him188 2023-03-02 12:46:31 +00:00
parent d11614d792
commit 2fd8929add
No known key found for this signature in database
GPG Key ID: BA439CDDCF652375

View File

@ -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))