插件和组件管理API

This commit is contained in:
UnCLAS-Prommer
2025-07-23 11:07:26 +08:00
parent 7a0adba070
commit 56c2adbaec
8 changed files with 469 additions and 105 deletions

View File

@@ -20,6 +20,7 @@
- `config_api.py`中的`get_global_config`和`get_plugin_config`方法现在支持嵌套访问的配置键名。
- `database_api.py`中的`db_query`方法调整了参数顺序以增强参数限制的同时保证了typing正确`db_get`方法增加了`single_result`参数,与`db_query`保持一致。
5. 增加了`logging_api`,可以用`get_logger`来获取日志记录器。
6. 增加了插件和组件管理的API。
# 插件系统修改
1. 现在所有的匹配模式不再是关键字了,而是枚举类。**(可能有遗漏)**
@@ -53,11 +54,13 @@
- 通过`disable_specific_chat_action``enable_specific_chat_action``disable_specific_chat_command``enable_specific_chat_command``disable_specific_chat_event_handler``enable_specific_chat_event_handler`来操作
- 同样不保存到配置文件~
# 官方插件修改
1. `HelloWorld`插件现在有一个样例的`EventHandler`。
### TODO
把这个看起来就很别扭的config获取方式改一下
来个API管理这些启用禁用
# 吐槽
```python