Rename instanceWhose to getInstance

This commit is contained in:
Him188 2020-02-24 12:06:40 +08:00
parent 0a55733cb8
commit 559e24b4ce
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -60,7 +60,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
it.get()?.let(block)
}
fun instanceWhose(qq: Long): Bot {
fun getInstance(qq: Long): Bot {
instances.forEach {
it.get()?.let { bot ->
if (bot.uin == qq) {