📝 生成了api文档
This commit is contained in:
@ -8,194 +8,147 @@ category: API
|
||||
### ***def*** `run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None`
|
||||
|
||||
运行函数
|
||||
|
||||
Args:
|
||||
|
||||
funcs:
|
||||
Returns:
|
||||
|
||||
### ***def*** `on_before_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
注册启动时的函数
|
||||
Args:
|
||||
func:
|
||||
Returns:
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
### ***def*** `on_after_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
注册启动时的函数
|
||||
Args:
|
||||
func:
|
||||
Returns:
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
### ***def*** `on_before_process_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
注册停止前的函数
|
||||
Args:
|
||||
func:
|
||||
Returns:
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
### ***def*** `on_after_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
注册停止后的函数
|
||||
Args:
|
||||
func:
|
||||
|
||||
Returns:
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
### ***def*** `on_before_process_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
注册重启时的函数
|
||||
Args:
|
||||
func:
|
||||
Returns:
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
### ***def*** `on_after_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
注册重启后的函数
|
||||
Args:
|
||||
func:
|
||||
Returns:
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
### ***def*** `on_after_nonebot_init(self: Any, func: Any) -> None`
|
||||
|
||||
注册 NoneBot 初始化后的函数
|
||||
Args:
|
||||
func:
|
||||
|
||||
Returns:
|
||||
|
||||
### ***def*** `before_start(self: Any) -> None`
|
||||
|
||||
启动前
|
||||
Returns:
|
||||
|
||||
### ***def*** `after_start(self: Any) -> None`
|
||||
|
||||
启动后
|
||||
Returns:
|
||||
|
||||
### ***def*** `before_process_shutdown(self: Any) -> None`
|
||||
|
||||
停止前
|
||||
Returns:
|
||||
|
||||
### ***def*** `after_shutdown(self: Any) -> None`
|
||||
|
||||
停止后
|
||||
Returns:
|
||||
|
||||
### ***def*** `before_process_restart(self: Any) -> None`
|
||||
|
||||
重启前
|
||||
Returns:
|
||||
|
||||
### ***def*** `after_restart(self: Any) -> None`
|
||||
|
||||
重启后
|
||||
Returns:
|
||||
|
||||
### ***class*** `Lifespan`
|
||||
|
||||
|
||||
|
||||
#### `@staticmethod`
|
||||
###   ***@staticmethod***
|
||||
###   ***def*** `run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None`
|
||||
|
||||
####   ***def*** `run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None`
|
||||
 运行函数
|
||||
|
||||
运行函数
|
||||
Args:
|
||||
|
||||
funcs:
|
||||
|
||||
Returns:
|
||||
|
||||
####   ***def*** `on_before_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
###   ***def*** `on_before_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
 注册启动时的函数
|
||||
|
||||
注册启动时的函数
|
||||
Args:
|
||||
|
||||
func:
|
||||
|
||||
Returns:
|
||||
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
####   ***def*** `on_after_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
###   ***def*** `on_after_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
 注册启动时的函数
|
||||
|
||||
注册启动时的函数
|
||||
Args:
|
||||
|
||||
func:
|
||||
|
||||
Returns:
|
||||
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
####   ***def*** `on_before_process_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
###   ***def*** `on_before_process_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
 注册停止前的函数
|
||||
|
||||
注册停止前的函数
|
||||
Args:
|
||||
|
||||
func:
|
||||
|
||||
Returns:
|
||||
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
####   ***def*** `on_after_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
###   ***def*** `on_after_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
 注册停止后的函数
|
||||
|
||||
注册停止后的函数
|
||||
Args:
|
||||
|
||||
func:
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
####   ***def*** `on_before_process_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
###   ***def*** `on_before_process_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
 注册重启时的函数
|
||||
|
||||
注册重启时的函数
|
||||
Args:
|
||||
|
||||
func:
|
||||
|
||||
Returns:
|
||||
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
####   ***def*** `on_after_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
###   ***def*** `on_after_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
|
||||
|
||||
 注册重启后的函数
|
||||
|
||||
注册重启后的函数
|
||||
Args:
|
||||
|
||||
func:
|
||||
|
||||
Returns:
|
||||
|
||||
LIFESPAN_FUNC:
|
||||
|
||||
####   ***def*** `on_after_nonebot_init(self: Any, func: Any) -> None`
|
||||
###   ***def*** `on_after_nonebot_init(self: Any, func: Any) -> None`
|
||||
|
||||
 注册 NoneBot 初始化后的函数
|
||||
|
||||
注册 NoneBot 初始化后的函数
|
||||
Args:
|
||||
|
||||
func:
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
####   ***def*** `before_start(self: Any) -> None`
|
||||
###   ***def*** `before_start(self: Any) -> None`
|
||||
|
||||
 启动前
|
||||
|
||||
启动前
|
||||
Returns:
|
||||
|
||||
####   ***def*** `after_start(self: Any) -> None`
|
||||
###   ***def*** `after_start(self: Any) -> None`
|
||||
|
||||
 启动后
|
||||
|
||||
启动后
|
||||
Returns:
|
||||
|
||||
####   ***def*** `before_process_shutdown(self: Any) -> None`
|
||||
###   ***def*** `before_process_shutdown(self: Any) -> None`
|
||||
|
||||
 停止前
|
||||
|
||||
停止前
|
||||
Returns:
|
||||
|
||||
####   ***def*** `after_shutdown(self: Any) -> None`
|
||||
###   ***def*** `after_shutdown(self: Any) -> None`
|
||||
|
||||
 停止后
|
||||
|
||||
停止后
|
||||
Returns:
|
||||
|
||||
####   ***def*** `before_process_restart(self: Any) -> None`
|
||||
###   ***def*** `before_process_restart(self: Any) -> None`
|
||||
|
||||
 重启前
|
||||
|
||||
重启前
|
||||
Returns:
|
||||
|
||||
####   ***def*** `after_restart(self: Any) -> None`
|
||||
###   ***def*** `after_restart(self: Any) -> None`
|
||||
|
||||
 重启后
|
||||
|
||||
重启后
|
||||
Returns:
|
||||
|
||||
|
Reference in New Issue
Block a user