EventDispatcher

@InterfacedService(acceptMultiple = false)
abstract class EventDispatcher(source)

Dispatches JDA and BC events to @BEventListener methods.

Functions

Link copied to clipboard
abstract fun addEventListener(listener: Any)

Registers the given listener for JDA and BC events.

Link copied to clipboard
abstract suspend fun dispatchEvent(event: Any)

Dispatches the given event to the registered listeners.

Link copied to clipboard
abstract fun dispatchEventAsync(event: Any): List<Deferred<Unit>>

Dispatches the given event to the registered listeners.

Link copied to clipboard
@JvmName(name = "dispatchEvent")
fun dispatchEventJava(event: Any)

Dispatches the given event to the registered listeners.

Link copied to clipboard
abstract fun removeEventListener(listener: Any)

Unregisters the listener from JDA and BC events.