mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-21 18:15:50 +08:00
📝 update api docs
This commit is contained in:
parent
59ec5bacde
commit
f1ed783776
@ -25,38 +25,6 @@ sidebarDepth: 0
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## _class_ `Export`
|
|
||||||
|
|
||||||
基类:`dict`
|
|
||||||
|
|
||||||
|
|
||||||
* **说明**
|
|
||||||
|
|
||||||
插件导出内容以使得其他插件可以获得。
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* **示例**
|
|
||||||
|
|
||||||
|
|
||||||
```python
|
|
||||||
nonebot.export().default = "bar"
|
|
||||||
|
|
||||||
@nonebot.export()
|
|
||||||
def some_function():
|
|
||||||
pass
|
|
||||||
|
|
||||||
# this doesn't work before python 3.9
|
|
||||||
# use
|
|
||||||
# export = nonebot.export(); @export.sub
|
|
||||||
# instead
|
|
||||||
# See also PEP-614: https://www.python.org/dev/peps/pep-0614/
|
|
||||||
@nonebot.export().sub
|
|
||||||
def something_else():
|
|
||||||
pass
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## _class_ `Plugin`
|
## _class_ `Plugin`
|
||||||
|
|
||||||
基类:`object`
|
基类:`object`
|
||||||
@ -1442,22 +1410,6 @@ def something_else():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## `export()`
|
|
||||||
|
|
||||||
|
|
||||||
* **说明**
|
|
||||||
|
|
||||||
获取插件的导出内容对象
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* **返回**
|
|
||||||
|
|
||||||
|
|
||||||
* `Export`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## `require(name)`
|
## `require(name)`
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user