mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-06-18 02:18:09 +00:00
⚗️ auto import plugin when require
This commit is contained in:
parent
7d2a87b73e
commit
3d4adaa444
@ -962,5 +962,5 @@ def require(name: str) -> Optional[Export]:
|
|||||||
|
|
||||||
- ``Optional[Export]``
|
- ``Optional[Export]``
|
||||||
"""
|
"""
|
||||||
plugin = get_plugin(name)
|
plugin = get_plugin(name) or load_plugin(name)
|
||||||
return plugin.export if plugin else None
|
return plugin.export if plugin else None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user