Package-level declarations

Types

Link copied to clipboard
object Core
Link copied to clipboard
interface TencentGuildBot : CoroutineScope

一个 TencentGuildBot 标准接口,其只提供接口定义,而实现则在 core 模块中。

Link copied to clipboard

对于一个Bot的配置信息。 如果在配置bot之后对内容进行后续修改,可能会影响到当前bot的使用。

Functions

Link copied to clipboard
@Api4J
fun <R> doRequest(bot: TencentGuildBot, api: TencentApi<R>): R

直接通过bot进行请求。

Link copied to clipboard
inline fun TencentGuildBot.processor(typeName: String, crossinline block: suspend Signal.Dispatch.(decoder: Json, decoded: () -> Any) -> Unit)
inline fun <R : Any> TencentGuildBot.processor(eventType: EventSignals<R>, crossinline block: suspend (R) -> Unit)
Link copied to clipboard
suspend fun <R> TencentGuildBot.request(api: TencentApi<R>): R
suspend fun <R> TencentApi<R>.request(bot: TencentGuildBot): R

直接通过bot进行请求。

Link copied to clipboard
suspend fun <R> TencentApi<R>.requestBy(bot: TencentGuildBot): R

直接通过bot进行请求。

Link copied to clipboard
@JvmName(name = "newBot")
fun tencentGuildBot(appId: String, appKey: String, token: String, configBlock: TencentGuildBotConfiguration.() -> Unit = {}): TencentGuildBot