mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Fix subscribeAll
This commit is contained in:
parent
d59c7165eb
commit
c09d44f45a
@ -64,10 +64,7 @@ fun <E : Event> KClass<E>.subscribeAll(listeners: ListenerBuilder<E>.() -> Unit)
|
|||||||
* 监听一个事件. 可同时进行多种方式的监听
|
* 监听一个事件. 可同时进行多种方式的监听
|
||||||
* @see ListenerBuilder
|
* @see ListenerBuilder
|
||||||
*/
|
*/
|
||||||
inline fun <reified E : Event> subscribeAll(noinline listeners: ListenerBuilder<E>.() -> Unit) {
|
inline fun <reified E : Event> subscribeAll(noinline listeners: ListenerBuilder<E>.() -> Unit) = E::class.subscribeAll(listeners)
|
||||||
ListenerBuilder<E> { this.subscribeInternal(it) }.apply(listeners)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监听构建器. 可同时进行多种方式的监听
|
* 监听构建器. 可同时进行多种方式的监听
|
||||||
|
Loading…
Reference in New Issue
Block a user