mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-29 00:25:58 +08:00
48 lines
553 B
Markdown
48 lines
553 B
Markdown
|
# nonebot.drivers.\_lifespan
|
||
|
|
||
|
## _class_ `Lifespan()` {#Lifespan}
|
||
|
|
||
|
- **参数**
|
||
|
|
||
|
empty
|
||
|
|
||
|
### _method_ `on_startup(func)` {#Lifespan-on-startup}
|
||
|
|
||
|
- **参数**
|
||
|
|
||
|
- `func` (LIFESPAN_FUNC)
|
||
|
|
||
|
- **返回**
|
||
|
|
||
|
- LIFESPAN_FUNC
|
||
|
|
||
|
### _method_ `on_shutdown(func)` {#Lifespan-on-shutdown}
|
||
|
|
||
|
- **参数**
|
||
|
|
||
|
- `func` (LIFESPAN_FUNC)
|
||
|
|
||
|
- **返回**
|
||
|
|
||
|
- LIFESPAN_FUNC
|
||
|
|
||
|
### _async method_ `startup()` {#Lifespan-startup}
|
||
|
|
||
|
- **参数**
|
||
|
|
||
|
empty
|
||
|
|
||
|
- **返回**
|
||
|
|
||
|
- None
|
||
|
|
||
|
### _async method_ `shutdown()` {#Lifespan-shutdown}
|
||
|
|
||
|
- **参数**
|
||
|
|
||
|
empty
|
||
|
|
||
|
- **返回**
|
||
|
|
||
|
- None
|