Skip to content

[Feature]在插件加载失败时提供“填写配置”选项 #8592

@Waterwzy

Description

@Waterwzy

Description / 描述

如题,在当前版本,插件加载失败只会有“重载”和“卸载”两种选择。
如果插件的配置文件不能满足作者需求,作者需要在插件载入时校验配置项,配置不合法的唯一方法就是logger记录错误并且宽容启动。(如果raise error会导致UI界面根本没有填写配置的选项)
在这种情况下,插件作者能做的最多只有给个默认值;如果能在插件载入失败时提供重新填写配置的选择,插件就可以在载入时立刻抛出错误,用户也能知道自己哪里填写不符合规范从而更改自己的配置而不是让插件以错误的配置跑起来。

Use Case / 使用场景

载入插件失败时

Willing to Submit PR? / 是否愿意提交PR?

  • Yes, I am willing to submit a PR. / 是的,我愿意提交 PR。

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendenhancementNew feature or requestfeature:pluginThe bug / feature is about AstrBot plugin system.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions