Commit 559e24b4 authored by Him188's avatar Him188

Rename `instanceWhose` to `getInstance`

parent 0a55733c
......@@ -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)
}
/**
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment