mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-30 04:15:45 +08:00
doc: 优化api参考页的内容
This commit is contained in:
@@ -124,14 +124,14 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "开发",
|
||||
text: "插件",
|
||||
// collapsed: true,
|
||||
items: [
|
||||
{ text: "插件介绍", link: "/develop/plugin-intro" },
|
||||
{ text: "插件开发", link: "/develop/plugin-dev" },
|
||||
{ text: "组件拓展", link: "/develop/extension" },
|
||||
{ text: "API参考", link: "/develop/api-ref" },
|
||||
{ text: "技术信息", link: "/develop/tech-info" },
|
||||
{ text: "插件介绍", link: "/plugin/plugin-intro" },
|
||||
{ text: "插件开发", link: "/plugin/plugin-dev" },
|
||||
{ text: "组件拓展", link: "/plugin/extension" },
|
||||
{ text: "API参考", link: "/plugin/api-ref" },
|
||||
{ text: "技术信息", link: "/plugin/tech-info" },
|
||||
],
|
||||
},
|
||||
// {
|
||||
|
||||
@@ -28,6 +28,8 @@ ctx.send_message(target_type: str, target_id: str, message_chain: mirai.MessageC
|
||||
- `target_id`:目标 ID(QQ 号或群号)
|
||||
- `message_chain`:[YiriMirai 的 MessageChain 对象](https://yiri-mirai.wybxc.cc/docs/basic/message-chain),若用户使用的不是 YiriMirai 适配器,程序也能自动转换为目标消息链
|
||||
|
||||
## 事件处理
|
||||
|
||||
### 阻止事件默认行为
|
||||
|
||||
```python
|
||||
@@ -50,4 +52,4 @@ ctx.prevent_postorder()
|
||||
ctx.add_return(name: str, value: Any)
|
||||
```
|
||||
|
||||
添加返回值,返回值可在事件监听器中通过`ctx.returns[name]`访问。事件返回值均为**可选**的,每个事件支持的返回值请查看`pkg.plugin.events`中的每个事件的注释。
|
||||
添加返回值,事件返回值均为**可选**的,每个事件支持的返回值请查看`pkg.plugin.events`中的每个事件的注释。
|
||||
Reference in New Issue
Block a user