Skip to content

Commit

Permalink
📝 update api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nonebot committed Mar 4, 2021
1 parent db61a93 commit 59a855f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/api/nonebot.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ sidebarDepth: 0
* `require` => `nonebot.plugin.require`


## `get_app()`
## `get_driver()`


* **说明**

获取全局 Driver 对应 Server App 对象。
获取全局 Driver 对象。可用于在计划任务的回调中获取当前 Driver 对象。



* **返回**


* `Any`: Server App 对象
* `Driver`: 全局 Driver 对象



Expand All @@ -97,23 +97,23 @@ sidebarDepth: 0


```python
app = nonebot.get_app()
driver = nonebot.get_driver()
```


## `get_asgi()`
## `get_app()`


* **说明**

获取全局 Driver 对应 Asgi 对象。
获取全局 Driver 对应 Server App 对象。



* **返回**


* `Any`: Asgi 对象
* `Any`: Server App 对象



Expand All @@ -128,23 +128,23 @@ app = nonebot.get_app()


```python
asgi = nonebot.get_asgi()
app = nonebot.get_app()
```


## `get_bots()`
## `get_asgi()`


* **说明**

获取所有通过 ws 连接 NoneBot 的 Bot 对象。
获取全局 Driver 对应 Asgi 对象。



* **返回**


* `Dict[str, Bot]`: 一个以字符串 ID 为键,Bot 对象为值的字典
* `Any`: Asgi 对象



Expand All @@ -159,23 +159,23 @@ asgi = nonebot.get_asgi()


```python
bots = nonebot.get_bots()
asgi = nonebot.get_asgi()
```


## `get_driver()`
## `get_bots()`


* **说明**

获取全局 Driver 对象。可用于在计划任务的回调中获取当前 Driver 对象。
获取所有通过 ws 连接 NoneBot 的 Bot 对象。



* **返回**


* `Driver`: 全局 Driver 对象
* `Dict[str, Bot]`: 一个以字符串 ID 为键,Bot 对象为值的字典



Expand All @@ -190,7 +190,7 @@ bots = nonebot.get_bots()


```python
driver = nonebot.get_driver()
bots = nonebot.get_bots()
```


Expand Down

0 comments on commit 59a855f

Please sign in to comment.