mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-01 04:10:12 +08:00
Add Bot.botInstancesSequence
This commit is contained in:
parent
5fd1ba86eb
commit
57b85a3517
@ -84,6 +84,15 @@ abstract class Bot internal constructor(
|
|||||||
val botInstances: List<Bot>
|
val botInstances: List<Bot>
|
||||||
get() = _instances.asSequence().mapNotNull { it.get() }.toList()
|
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] 实例
|
* 遍历每一个 [Bot] 实例
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user