Skip to content

Commit

Permalink
🔀 Merge pull request #259
Browse files Browse the repository at this point in the history
Plugin: biliav小程序转换器
  • Loading branch information
yanyongyu authored Mar 4, 2021
2 parents cb6c1cc + 59a855f commit 15c6f30
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
10 changes: 9 additions & 1 deletion docs/.vuepress/public/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,13 @@
"desc": "输入拼音首字母,猜测文字",
"name": "缩写查询器",
"repo": "anlen123/nonebot_plugin_abbrreply"
},
{
"id": "nonebot_plugin_biliav",
"link": "nonebot_plugin_biliav",
"author": "knva",
"desc": "将用户发的av号或者bv号转成小程序返回",
"name": "biliav小程序转换器",
"repo": "knva/nonebot_plugin_biliav"
}
]
]
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 15c6f30

Please sign in to comment.