fix(plugins): 修复 tts 插件中错误的机器人根目录路径
之前的路径 `plugin_file.parent.parent.parent` 错误地指向了 `src` 目录,而不是项目根目录。 此更改通过将路径调整为 `...parent.parent.parent.parent.parent`,修正了根目录的计算逻辑,确保能够正确找到并加载配置文件。
This commit is contained in:
@@ -62,7 +62,7 @@ class TTSVoicePlugin(BasePlugin):
|
||||
if top_key in manual_load_keys:
|
||||
try:
|
||||
plugin_file = Path(__file__).resolve()
|
||||
bot_root = plugin_file.parent.parent.parent
|
||||
bot_root = plugin_file.parent.parent.parent.parent.parent
|
||||
config_file = bot_root / "config" / "plugins" / self.plugin_name / self.config_file_name
|
||||
|
||||
if not config_file.is_file():
|
||||
|
||||
Reference in New Issue
Block a user