mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 22:00:10 +08:00
Rename instanceWhose
to getInstance
This commit is contained in:
parent
0a55733cb8
commit
559e24b4ce
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user