Generic Bot.alsoLogin

This commit is contained in:
Him188 2020-01-10 23:20:16 +08:00
parent ab98206d18
commit 14ac929328

View File

@ -18,7 +18,7 @@ import kotlin.jvm.JvmName
* *
* @throws LoginFailedException * @throws LoginFailedException
*/ */
suspend inline fun Bot.alsoLogin(): Bot = also { login() } suspend inline fun <B: Bot> B.alsoLogin(): B = also { login() }
/** /**
* 取得机器人的 QQ * 取得机器人的 QQ