Rename instanceWhose to getInstance

This commit is contained in:
Him188 2020-02-24 11:56:07 +08:00
parent 583c99392d
commit 0a55733cb8
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ private data class AuthRetDTO(val code: Int, val session: String) : DTO
private data class BindDTO(override val sessionKey: String, val qq: Long) : VerifyDTO()
private fun getBotOrThrow(qq: Long) = try {
Bot.instanceWhose(qq)
Bot.getInstance(qq)
} catch (e: NoSuchElementException) {
throw NoSuchBotException
}

View File

@ -59,7 +59,7 @@ abstract class Bot : CoroutineScope {
* 获取一个 [Bot] 实例, 找不到则 [NoSuchElementException]
*/
@JvmStatic
fun instanceWhose(qq: Long): Bot = BotImpl.instanceWhose(qq = qq)
fun getInstance(qq: Long): Bot = BotImpl.instanceWhose(qq = qq)
}
/**