Default One Bot Client
class DefaultOneBotClient(transport: OneBotTransport, json: Json = OneBotJson.default) : OneBotClient
Default OneBotClient implementation backed by a OneBotTransport.
Properties
Functions
Link copied to clipboard
open suspend override fun <T> call(action: String, params: JsonObject, serializer: KSerializer<T>): ApiResponse<T>
Calls a OneBot action and decodes the data field with serializer.
Link copied to clipboard
Calls delete_message.
Link copied to clipboard
Calls get_self_info.
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
Calls send_message.
Link copied to clipboard
Creates a full OneBotV12Api wrapper from an existing OneBotClient.