Default One Bot V11Client
class DefaultOneBotV11Client(transport: OneBotV11Transport, json: Json = OneBotV11Json.default) : OneBotV11Client
Default OneBotV11Client implementation backed by a OneBotV11Transport.
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_msg.
Link copied to clipboard
Calls get_login_info.
Link copied to clipboard
fun OneBotV11Client.listenEventsAnnotated(listener: Any, scope: CoroutineScope, onHandlerError: (Throwable, OneBotV11Event) -> Unit = { error, _ -> throw error }): Job
Subscribes to OneBotV11Client.events and dispatches each event to methods annotated with Event.
Link copied to clipboard
open suspend override fun sendGroupMessage(request: SendGroupMessageRequest): ApiResponse<SendMessageResult>
Calls send_group_msg.
Link copied to clipboard
open suspend override fun sendPrivateMessage(request: SendPrivateMessageRequest): ApiResponse<SendMessageResult>
Calls send_private_msg.
Link copied to clipboard
Creates a OneBotV11Api wrapper from an existing OneBotV11Client.