Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien8261 committed Nov 14, 2023
1 parent f497979 commit 895c28e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/develop/adapters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
## 适配器参数 adapter

AmiyaBot 对象拥有一个适配器参数 adapter,接受一个 `BotAdapterProtocol` 的子类。默认值为 QQ
频道机器人的适配器 `TencentBotInstance`
频道机器人的适配器 `QQGuildBotInstance`

```python
class AmiyaBot(BotHandlerFactory):
def __init__(self,
...
adapter: Type[BotAdapterProtocol] = TencentBotInstance):
adapter: Type[BotAdapterProtocol] = QQGuildBotInstance):
...
```

Expand Down
6 changes: 3 additions & 3 deletions docs/develop/adapters/qqChannel.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

## 沙箱环境

使用 `TencentSandboxBotInstance` 适配器将 API 调用更改为沙箱环境。沙箱环境只会收到测试频道的事件,且调用 openapi 仅能操作测试频道。
使用 `QQGuildSandboxBotInstance` 适配器将 API 调用更改为沙箱环境。沙箱环境只会收到测试频道的事件,且调用 openapi 仅能操作测试频道。

```python
from amiyabot.adapters.tencent import TencentSandboxBotInstance
from amiyabot.adapters.tencent.qqGuild import QQGuildSandboxBotInstance

bot = AmiyaBot(..., adapter=TencentSandboxBotInstance)
bot = AmiyaBot(..., adapter=QQGuildSandboxBotInstance)
```
6 changes: 3 additions & 3 deletions docs/develop/basic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ bot.set_prefix_keywords(['amiya', 'amy'])

## 沙箱环境

使用 `TencentSandboxBotInstance` 适配器将 API 调用更改为沙箱环境。沙箱环境只会收到测试频道的事件,且调用 openapi 仅能操作测试频道。
使用 `QQGuildSandboxBotInstance` 适配器将 API 调用更改为沙箱环境。沙箱环境只会收到测试频道的事件,且调用 openapi 仅能操作测试频道。

```python
from amiyabot.adapters.tencent import TencentSandboxBotInstance
from amiyabot.adapters.tencent.qqGuild import QQGuildSandboxBotInstance

bot = AmiyaBot(..., adapter=TencentSandboxBotInstance)
bot = AmiyaBot(..., adapter=QQGuildSandboxBotInstance)
```

0 comments on commit 895c28e

Please sign in to comment.