mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-11-04 08:56:42 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			1.0 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.0 KiB
		
	
	
	
	
	
	
	
sidebar_position, description
| sidebar_position | description | 
|---|---|
| 6 | nonebot.drivers.none 模块 | 
nonebot.drivers.none
None 驱动适配
:::tip 提示 本驱动不支持任何服务器或客户端连接 :::
class Driver(env, config)
property type
- 
类型: str
 - 
说明: 驱动名称:
none 
property logger
- 
类型:
 - 
说明: none driver 使用的 logger
 
method on_startup(func)
- 
说明: 注册一个启动时执行的函数
 - 
参数
func(LIFESPAN_FUNC)
 - 
返回
- LIFESPAN_FUNC
 
 
method on_shutdown(func)
- 
说明: 注册一个停止时执行的函数
 - 
参数
func(LIFESPAN_FUNC)
 - 
返回
- LIFESPAN_FUNC
 
 
method run(*args, **kwargs)
- 
说明: 启动 none driver
 - 
参数
- 
*args - 
**kwargs 
 - 
 - 
返回
- untyped