mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-08-02 11:40:04 +00:00
✨ 添加函数调用支持,重构插件加载机制,优化函数描述和模块路径管理
This commit is contained in:
@ -58,6 +58,8 @@ class Plugin(BaseModel):
|
||||
"""插件模块对象"""
|
||||
module_name: str
|
||||
"""点分割模块路径 例如a.b.c"""
|
||||
module_path: str | None
|
||||
"""实际路径,单文件为.py的路径,包为__init__.py路径"""
|
||||
metadata: PluginMetadata | None = None
|
||||
"""元"""
|
||||
|
||||
@ -69,3 +71,6 @@ class Plugin(BaseModel):
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
return self.name == other.name
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"Plugin({self.name}({self.module_path}))"
|
||||
|
Reference in New Issue
Block a user