Commit a5d613cf authored by Him188's avatar Him188

Add Bot.botInstancesSequence

parent ab6269b3
......@@ -84,6 +84,15 @@ abstract class Bot internal constructor(
val botInstances: List<Bot>
get() = _instances.asSequence().mapNotNull { it.get() }.toList()
/**
* 复制一份此时的 [Bot] 实例列表.
*/
@MiraiExperimentalAPI
@SinceMirai("1.1.0")
@JvmStatic
val botInstancesSequence: Sequence<Bot>
get() = _instances.asSequence().mapNotNull { it.get() }
/**
* 遍历每一个 [Bot] 实例
*/
......
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