mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 12:05:54 +00:00
feat: 支持多场景预设切换
This commit is contained in:
@@ -189,6 +189,7 @@ def register(name: str, description: str, version: str, author: str):
|
||||
|
||||
__current_registering_plugin__ = name
|
||||
|
||||
# print("registering plugin: n='{}', d='{}', v={}, a='{}'".format(name, description, version, author))
|
||||
host.__plugins__[name] = {
|
||||
"name": name,
|
||||
"description": description,
|
||||
|
||||
@@ -23,6 +23,8 @@ def wrapper_dict_from_plugin_list() -> dict:
|
||||
|
||||
def apply_switch(switch: dict):
|
||||
"""将开关数据应用到插件列表中"""
|
||||
# print("将开关数据应用到插件列表中")
|
||||
# print(switch)
|
||||
for plugin_name in switch:
|
||||
host.__plugins__[plugin_name]["enabled"] = switch[plugin_name]["enabled"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user