mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
⚗️ auto import plugin when require
This commit is contained in:
@ -962,5 +962,5 @@ def require(name: str) -> Optional[Export]:
|
||||
|
||||
- ``Optional[Export]``
|
||||
"""
|
||||
plugin = get_plugin(name)
|
||||
plugin = get_plugin(name) or load_plugin(name)
|
||||
return plugin.export if plugin else None
|
||||
|
Reference in New Issue
Block a user