Skip to content

Commit

Permalink
doc: 挖一堆文档的坑
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Mar 4, 2024
1 parent f735279 commit aac52de
Show file tree
Hide file tree
Showing 14 changed files with 114 additions and 6 deletions.
13 changes: 13 additions & 0 deletions Writerside/kook.tree
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@
<toc-element topic="message-send.md"/>
<toc-element topic="message-element.md"/>
<toc-element topic="unsupported-event.md"/>
<toc-element topic="logger.md"/>
<toc-element topic="objects.md">
<toc-element topic="objects-Card.md"/>
<toc-element topic="object-KMarkdown.md"/>
<toc-element topic="objects-Attachments.md"/>
</toc-element>
</toc-element>
<toc-element topic="actors.md">
<toc-element topic="kookbot.md"/>
<toc-element topic="KookGuild.md"/>
<toc-element topic="KookChannel.md"/>
<toc-element topic="KookMember.md"/>
<toc-element topic="role-api.md"/>
<toc-element topic="KookUserChat.md"/>
</toc-element>
<toc-element toc-title="其他版本">
<toc-element toc-title="v3.3.0.0-beta1">
Expand Down
3 changes: 3 additions & 0 deletions Writerside/topics/KookChannel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 子频道 KookChannel

Start typing here...
3 changes: 3 additions & 0 deletions Writerside/topics/KookGuild.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 频道 KookGuild

Start typing here...
3 changes: 3 additions & 0 deletions Writerside/topics/KookMember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 频道成员 KookMember

Start typing here...
3 changes: 3 additions & 0 deletions Writerside/topics/KookUserChat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 私聊会话 KookUserChat

Start typing here...
6 changes: 6 additions & 0 deletions Writerside/topics/actors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 行为对象

KOOK的**行为对象**(例如 `KookGuild``KookMember` 等)
都是对 simbot 标准库中的行为对象进行的实现与延伸扩展。

你可以前往了解 [simbot标准库的 **行为对象**](https://simbot.forte.love/basic-actor.html)
3 changes: 3 additions & 0 deletions Writerside/topics/kookbot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# KookBot

Start typing here...
42 changes: 42 additions & 0 deletions Writerside/topics/logger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 日志

## API 日志

开启 `love.forte.simbot.kook.api``DEBUG` 级别日志,
可以看到 **所有** API 请求过程中的信息,例如入参、结果等。

<warning>

这可能会泄露一些隐私信息,请注意保护日志安全。

</warning>

## Stdlib Bot 日志

在stdlib模块下的 `Bot` 中提供了两个日志命名:

<list>
<li>

`love.forte.simbot.kook.bot.${ticket.clientId}`

开启 `DEBUG``TRACE` 级别的日志可得到一些利于调试的、与事件之外的内容相关的日志。

</li>
<li>

`love.forte.simbot.kook.event.${ticket.clientId}`

开启 `DEBUG``TRACE` 级别的日志可得到一些利于调试的、与事件相关的日志。

</li>
</list>

其中 `${ticket.clientId}` 就是你 Bot 对应的信息。

## 组件库 KookBot 日志

在core模块下的 `KookBot` 中提供了
`love.forte.simbot.component.kook.bot.${sourceBot.ticket.clientId}`
的日志,开启它的 `DEBUG` 级别日志可以得到一些由组件库的 `KookBot`
额外提供的一些利于调试的日志。
14 changes: 10 additions & 4 deletions Writerside/topics/message-element.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ switcher-label: Java API 风格
---
# 消息元素

本章节介绍 KOOK 组件中针对 simbot4 的 **消息元素(`Message.Element`)** 的实现类型。
本章节介绍 KOOK 组件中针对 simbot 标准库中 **消息元素(`Message.Element`)** 的实现类型。

<tip title="标准库的标准">


</tip>

## Message.Element

先简单介绍一下 `Message.Element`。它是 simbot4 标准库中提供一个接口类型,
先简单介绍一下 `Message.Element`。它是 simbot 标准库中提供一个接口类型,
用来定义一个**消息元素**。一个消息元素或多个消息元素组成的**消息链**可用于发送消息。

simbot4 的标准库提供了一些常见的标准消息元素实现,例如 `At``Image` 等。
simbot 标准库提供了一些常见的标准消息元素实现,例如 `At``Image` 等。
但是很多情况下,对于一个组件而言这些标准实现可能不能满足需求,这时候就需要组件实现这个接口,
来提供更多期望的功能。

> 有关更详细的描述参考 [simbot4 手册](https://simbot.forte.love) 中的相关章节。
> 你可以前往 [simbot4 手册的消息元素](https://simbot.forte.love/basic-messages.html)
> 了解更多详情。
## 标准消息元素支持

Expand Down
5 changes: 5 additions & 0 deletions Writerside/topics/object-KMarkdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# KMarkdown

> 官方文档: [KMarkdown](https://developer.kookapp.cn/doc/kmarkdown)
Start typing here...
5 changes: 5 additions & 0 deletions Writerside/topics/objects-Attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Attachments

> 官方文档: [附加的多媒体数据 Attachments](https://developer.kookapp.cn/doc/objects#附加的多媒体数据%20Attachments)
Start typing here...
5 changes: 5 additions & 0 deletions Writerside/topics/objects-Card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Card

> 官方文档: [卡片消息](https://developer.kookapp.cn/doc/cardmessage)
Start typing here...
11 changes: 11 additions & 0 deletions Writerside/topics/objects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Objects

KOOK API 中提供了一些 [Objects](https://developer.kookapp.cn/doc/objects) 的定义,
在KOOK组件库的 **API模块** 针对这其中的大部分类型提供了对应的封装。

> 它们基本上都在包 `love.forte.simbot.kook.objects` 中。
>
> 此包下的部分内容也可能不在官方的 [Objects](https://developer.kookapp.cn/doc/objects) 分类下,
> 例如 `Card``KMarkdown`

4 changes: 2 additions & 2 deletions Writerside/topics/role-api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 角色操作
# 角色 KookRole

Start typing here...
Start typing here...

0 comments on commit aac52de

Please sign in to comment.