mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 17:20:11 +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
|
||||
*/
|
||||
inline fun <reified E : Event> subscribeAll(noinline listeners: ListenerBuilder<E>.() -> Unit) {
|
||||
ListenerBuilder<E> { this.subscribeInternal(it) }.apply(listeners)
|
||||
}
|
||||
|
||||
inline fun <reified E : Event> subscribeAll(noinline listeners: ListenerBuilder<E>.() -> Unit) = E::class.subscribeAll(listeners)
|
||||
|
||||
/**
|
||||
* 监听构建器. 可同时进行多种方式的监听
|
||||
|
Loading…
Reference in New Issue
Block a user