Use List instead of Sequence

This commit is contained in:
Him188 2020-04-22 13:40:51 +08:00
parent 373ad9e8aa
commit 4b05cb45d1

View File

@ -56,8 +56,8 @@ abstract class Bot : CoroutineScope, LowLevelBotAPIAccessor, BotJavaFriendlyAPI(
* 复制一份此时的 [Bot] 实例列表.
*/
@JvmStatic
val instances: Sequence<Bot>
get() = BotImpl.instances.asSequence().mapNotNull { it.get() }
val instances: List<Bot>
get() = BotImpl.instances.asSequence().mapNotNull { it.get() }.toList()
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
@JvmStatic