Package-level declarations

Types

Link copied to clipboard
class DefaultOneBotClient(transport: OneBotTransport, json: Json = OneBotJson.default) : OneBotClient

Default OneBotClient implementation backed by a OneBotTransport.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Event

Marks a listener method as an OneBot event handler.

Link copied to clipboard

Reflection-based dispatcher that invokes listener methods annotated with Event.

Link copied to clipboard
interface OneBotClient

Core OneBot V12 client abstraction.

Link copied to clipboard
class OneBotV12Api(client: OneBotClient)

Full OneBot V12 action wrapper, covering all actions documented in onebots/docs protocol page.

Functions

Link copied to clipboard
fun OneBotClient.listenEventsAnnotated(listener: Any, scope: CoroutineScope, onHandlerError: (Throwable, OneBotEvent) -> Unit = { error, _ -> throw error }): Job

Subscribes to OneBotClient.events and dispatches each event to methods annotated with Event.

Link copied to clipboard

Builds an EventDispatcher from this listener instance.

Link copied to clipboard

Creates a full OneBotV12Api wrapper from an existing OneBotClient.