Refactor plugin identification to use package name and dirname
Updated plugin manager and API to distinguish between plugin package name and directory name (dirname) for more robust plugin identification and path resolution. Adjusted context creation, status management, and API handlers to use package name for identification and dirname for filesystem operations. Also replaced console.error with console.log in builtin plugin for consistency.
This commit is contained in:
1 parent
8262988f7b
commit
6af66797dc
4 files changed
+46
-68
No files matched your search
@@ -97,7 +97,7 @@ const plugin_onmessage: PluginModule['plugin_onmessage'] = async (_ctx, event) =
|
||||
|
||||
console.log('[Plugin: builtin] 已回复版本信息');
|
||||
} catch (error) {
|
||||
console.error('[Plugin: builtin] 处理消息时发生错误:', error);
|
||||
console.log('[Plugin: builtin] 处理消息时发生错误:', error);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -150,7 +150,7 @@ async function sendMessage (actions: ActionMap, event: OB11Message, message: str
|
||||
try {
|
||||
await actions.call('send_msg', params, adapter, config);
|
||||
} catch (error) {
|
||||
console.error('[Plugin: builtin] 发送消息失败:', error);
|
||||
console.log('[Plugin: builtin] 发送消息失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user