mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 09:38:21 +08: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]``
|
||||
"""
|
||||
plugin = get_plugin(name)
|
||||
plugin = get_plugin(name) or load_plugin(name)
|
||||
return plugin.export if plugin else None
|
||||
|
Loading…
Reference in New Issue
Block a user